ap

Dependencies:   DnsQuery

Dependents:   WizFi310_TCP_Echo_Server_Example

Fork of NetworkSocketAPI by NetworkSocketAPI

Branch:
api-changes
Revision:
34:c17745683385
Parent:
32:2c5fc105fc50
Child:
38:157fb2ab965f
--- a/Socket.h	Tue Feb 23 17:14:20 2016 +0000
+++ b/Socket.h	Mon Feb 22 19:56:44 2016 -0600
@@ -29,16 +29,14 @@
     /** Set the URL of the socket
      *  Performs DNS lookup if necessary
      *  @param url URL to connect to
-     *  @param port Optional port to connect to
      *  @return 0 on success
      */
-    int32_t setURL(const char *url, uint16_t port = 0);
+    int32_t setURL(const char *url);
 
     /** Set the IP address of the socket
      *  @param ip IP address to connect to, copied internally
-     *  @param port Optional port to connect to
      */
-    void setIPAddress(const char *ip, uint16_t port = 0);
+    void setIPAddress(const char *ip);
 
     /** Set the port of the socket
      *  @param port Port to connect to
@@ -57,9 +55,11 @@
 
 
     /** Open a connection to the underlying address
+     *  @param url Optional URL or IP address to connect to
+     *  @param port Optional port to connect to
      *  @return 0 on success
      */
-    int32_t open();
+    int32_t open(const char *url = 0, uint16_t port = 0);
 
     /** Close an open connection
      *  @return 0 on success