mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
net/udp: Fix several issues using connected UDP sockets: sendto() should not accept and address. Normally send() should be used instead. recvfrom() is no longer necessary. recvfrom() and poll() should not reset to accept any addresses but should, instead, only accept inputs and events from the connected remore peer. On of these issues was noted by 李桂丁 <liguiding@pinecone.net>. Changes were made as summarized here: http://www.masterraghu.com/subjects/np/introduction/unix_network_programming_v1.3/ch08lev1sec11.html
This commit is contained in:
+1
-1
@@ -67,7 +67,7 @@
|
||||
#define _SF_LISTENING 0x10 /* Bit 4: SOCK_STREAM is listening */
|
||||
#define _SF_BOUND 0x20 /* Bit 5: SOCK_STREAM is bound to an address */
|
||||
/* Bits 6-7: Connection state */
|
||||
#define _SF_CONNECTED 0x40 /* Bit 6: SOCK_STREAM is connected */
|
||||
#define _SF_CONNECTED 0x40 /* Bit 6: SOCK_STREAM/SOCK_DGRAM is connected */
|
||||
#define _SF_CLOSED 0x80 /* Bit 7: SOCK_STREAM was gracefully disconnected */
|
||||
|
||||
/* Connection state encoding:
|
||||
|
||||
Reference in New Issue
Block a user