mbed socket API

Dependents:   EthernetInterface EthernetInterface_RSF EthernetInterface EthernetInterface ... more

Deprecated

This is an mbed 2 sockets library. For mbed 5, network sockets have been revised to better support additional network stacks and thread safety here.

Files at this revision

API Documentation at this revision

Comitter:
emilmont
Date:
Thu Jul 26 10:07:43 2012 +0000
Parent:
3:e6474399e057
Child:
5:300e7ad2dc1d
Commit message:
Add "const" specifier to "TCPSocketConnection::connect" parameters

Changed in this revision

TCPSocketConnection.cpp Show annotated file Show diff for this revision Revisions of this file
TCPSocketConnection.h Show annotated file Show diff for this revision Revisions of this file
--- a/TCPSocketConnection.cpp	Wed Jul 25 14:59:37 2012 +0000
+++ b/TCPSocketConnection.cpp	Thu Jul 26 10:07:43 2012 +0000
@@ -27,7 +27,7 @@
     _ipAddress[0] = '\0';
 }
 
-int TCPSocketConnection::connect(char* host, int port) {
+int TCPSocketConnection::connect(const char* host, const int port) {
     if (init(SOCK_STREAM) < 0)
         return -1;
     
--- a/TCPSocketConnection.h	Wed Jul 25 14:59:37 2012 +0000
+++ b/TCPSocketConnection.h	Thu Jul 26 10:07:43 2012 +0000
@@ -39,7 +39,7 @@
     \param port The host's port to connect to.
     \return 0 on success, -1 on failure.
     */
-    int connect(char* host, int port);
+    int connect(const char* host, const int port);
     
     /** Send data to the remote host.
     \param data The buffer to send to the host.