]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_Sockets.h
Sync FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP with the version in GitHub at (23665258ca...
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-TCP / include / FreeRTOS_Sockets.h
index a8a5710b7ebe640d0cf2523d757600103cdd84c0..88d3bba651225c932624199d3d4b09215386d82d 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * FreeRTOS+TCP V2.0.7\r
+ * FreeRTOS+TCP V2.2.0\r
  * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
@@ -55,7 +55,7 @@ extern "C" {
 \r
 /* Assigned to an Socket_t variable when the socket is not valid, probably\r
 because it could not be created. */\r
-#define FREERTOS_INVALID_SOCKET        ( ( void * ) ~0U )\r
+#define FREERTOS_INVALID_SOCKET        ( ( Socket_t ) ~0U )\r
 \r
 /* API function error values.  As errno is supported, the FreeRTOS sockets\r
 functions return error codes rather than just a pass or fail indication. */\r
@@ -130,6 +130,7 @@ FreeRTOS_setsockopt(). */
        #define FREERTOS_SO_WAKEUP_CALLBACK     ( 17 )\r
 #endif\r
 \r
+#define FREERTOS_SO_SET_LOW_HIGH_WATER ( 18 )\r
 \r
 #define FREERTOS_NOT_LAST_IN_FRAGMENTED_PACKET         ( 0x80 )  /* For internal use only, but also part of an 8-bit bitwise value. */\r
 #define FREERTOS_FRAGMENTED_PACKET                             ( 0x40 )  /* For internal use only, but also part of an 8-bit bitwise value. */\r
@@ -155,6 +156,12 @@ typedef struct xWIN_PROPS {
        int32_t lRxWinSize;     /* Unit: MSS */\r
 } WinProperties_t;\r
 \r
+typedef struct xLOW_HIGH_WATER {\r
+       /* Structure to pass for the 'FREERTOS_SO_SET_LOW_HIGH_WATER' option */\r
+       size_t uxLittleSpace;   /* Send a STOP when buffer space drops below X bytes */\r
+       size_t uxEnoughSpace;   /* Send a GO when buffer space grows above X bytes */\r
+} LowHighWater_t;\r
+\r
 /* For compatibility with the expected Berkeley sockets naming. */\r
 #define socklen_t uint32_t\r
 \r
@@ -206,11 +213,13 @@ struct freertos_sockaddr
 #endif /* ipconfigBYTE_ORDER */\r
 \r
 /* The socket type itself. */\r
-typedef void *Socket_t;\r
+struct xSOCKET;\r
+typedef struct xSOCKET *Socket_t;\r
 \r
 /* The SocketSet_t type is the equivalent to the fd_set type used by the\r
 Berkeley API. */\r
-typedef void *SocketSet_t;\r
+struct xSOCKET_SET;\r
+typedef struct xSOCKET_SET *SocketSet_t;\r
 \r
 /**\r
  * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE\r