NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   HelloWizFi250Interface

Fork of NetworkSocketAPI by NetworkSocketAPI

Files at this revision

API Documentation at this revision

Comitter:
Christopher Haster
Date:
Wed Apr 20 03:19:26 2016 -0500
Parent:
111:df01ca3e89b3
Child:
113:80ba92c5e5ca
Commit message:
Add standardized stack options

Changed in this revision

NetworkStack.h Show annotated file Show diff for this revision Revisions of this file
--- a/NetworkStack.h	Wed Apr 20 02:56:07 2016 -0500
+++ b/NetworkStack.h	Wed Apr 20 03:19:26 2016 -0500
@@ -53,6 +53,30 @@
    NSAPI_UDP, /*!< Socket is of UDP type */
 };
 
+/*  Enum of standardized stack option levels
+ *
+ *  @enum nsapi_level_t
+ */
+enum nsapi_level_t {
+    NSAPI_STACK,  /*!< Stack option level */
+    NSAPI_SOCKET, /*!< Socket option level */
+};
+
+/*  Enum of standardized stack options
+ *
+ *  These options may not be supported on all stacks, in which
+ *  case NSAPI_ERROR_UNSUPPORTED may be returned from setsockopt.
+ *
+ *  @enum nsapi_option_t
+ */
+enum nsapi_option_t {
+    NSAPI_REUSEADDR, /*!< Allow bind to reuse local addresses */
+    NSAPI_KEEPALIVE, /*!< Enables sending of keepalive messages */
+    NSAPI_LINGER,    /*!< Keeps close from returning until queues empty */
+    NSAPI_SNDBUF,    /*!< Sets send buffer size */
+    NSAPI_RCVBUF,    /*!< Sets recv buffer size */
+};
+
 /** Maximum size of MAC address representation
  */
 #define NSAPI_MAC_SIZE 18