Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of NySNICInterface by
Diff: Socket/TCPSocketConnection.cpp
- Revision:
- 27:dcc4f34448f0
- Parent:
- 26:f2e1030964e4
- Child:
- 29:6a0ba999597d
diff -r f2e1030964e4 -r dcc4f34448f0 Socket/TCPSocketConnection.cpp
--- a/Socket/TCPSocketConnection.cpp	Fri Mar 28 03:03:40 2014 +0000
+++ b/Socket/TCPSocketConnection.cpp	Mon Mar 31 02:06:14 2014 +0000
@@ -40,7 +40,7 @@
 {
 }
 
-int TCPSocketConnection::connect( unsigned int ip_addr, unsigned short port)
+int TCPSocketConnection::connect( const char *ip_addr_p, unsigned short port)
 {
     int ret;
     C_SNIC_Core               *snic_core_p  = C_SNIC_Core::getInstance();
@@ -62,6 +62,10 @@
         return -1;
     }
 
+    // IP address convert to number from strings.     
+    unsigned int ip_addr = addrToInteger(ip_addr_p);
+    printf("connect to [%s](%08x)\r\n", ip_addr_p, ip_addr);
+
     C_SNIC_Core::tagSNIC_TCP_CONNECT_TO_SERVER_REQ_T req;
     // Make request
     req.cmd_sid      = UART_CMD_SID_SNIC_TCP_CONNECT_TO_SERVER_REQ;
    