mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
struct netconn.socket is only used with LWIP_SOCKET; added comments
This commit is contained in:
parent
b6babe38ea
commit
2d1631792a
@ -600,7 +600,9 @@ netconn_alloc(enum netconn_type t, netconn_callback callback)
|
||||
conn->acceptmbox = SYS_MBOX_NULL;
|
||||
conn->state = NETCONN_NONE;
|
||||
/* initialize socket to -1 since 0 is a valid socket */
|
||||
#if LWIP_SOCKET
|
||||
conn->socket = -1;
|
||||
#endif /* LWIP_SOCKET */
|
||||
conn->callback = callback;
|
||||
conn->recv_avail = 0;
|
||||
#if LWIP_TCP
|
||||
|
@ -151,7 +151,9 @@ struct netconn {
|
||||
by the application thread */
|
||||
sys_mbox_t acceptmbox;
|
||||
/** only used for socket layer */
|
||||
#if LWIP_SOCKET
|
||||
int socket;
|
||||
#endif /* LWIP_SOCKET */
|
||||
#if LWIP_SO_RCVTIMEO
|
||||
/** timeout to wait for new data to be received
|
||||
(or connections to arrive for listening netconns) */
|
||||
@ -162,7 +164,12 @@ struct netconn {
|
||||
not used for TCP: adjust TCP_WND instead! */
|
||||
int recv_bufsize;
|
||||
#endif /* LWIP_SO_RCVBUF */
|
||||
/** number of bytes currently in recvmbox to be received,
|
||||
tested against recv_bufsize to limit bytes on recvmbox
|
||||
for UDP and RAW
|
||||
@todo: should only be necessary with LWIP_SO_RCVBUF==1 */
|
||||
s16_t recv_avail;
|
||||
/** flags holding more netconn-internal state, see NETCONN_FLAG_* defines */
|
||||
u8_t flags;
|
||||
#if LWIP_TCP
|
||||
/** TCP: when data passed to netconn_write doesn't fit into the send buffer,
|
||||
|
Loading…
Reference in New Issue
Block a user