mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-16 21:26:43 +08:00
sockets.h, sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c, tcp.h, tcp_out.c: Integrate "patch #6250 : MSG_MORE flag for send". MSG_MORE is used at socket api layer, NETCONN_MORE at netconn api layer, and TCP_WRITE_FLAG_MORE at raw api layer. This option enable to delayed TCP PUSH flag on multiple "write" calls. Note that previous "copy" parameter for "write" APIs is now called "apiflags".
This commit is contained in:
@@ -54,8 +54,10 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/* Flags for netconn_write */
|
||||
#define NETCONN_NOCOPY 0x00
|
||||
#define NETCONN_COPY 0x01
|
||||
#define NETCONN_NOFLAG 0x00
|
||||
#define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */
|
||||
#define NETCONN_COPY TCP_WRITE_FLAG_COPY
|
||||
#define NETCONN_MORE TCP_WRITE_FLAG_MORE
|
||||
|
||||
/* Helpers to process several netconn_types by the same code */
|
||||
#define NETCONNTYPE_GROUP(t) (t&0xF0)
|
||||
@@ -164,7 +166,7 @@ err_t netconn_send (struct netconn *conn,
|
||||
struct netbuf *buf);
|
||||
err_t netconn_write (struct netconn *conn,
|
||||
const void *dataptr, int size,
|
||||
u8_t copy);
|
||||
u8_t apiflags);
|
||||
err_t netconn_close (struct netconn *conn);
|
||||
|
||||
#if LWIP_IGMP
|
||||
|
||||
@@ -64,7 +64,7 @@ struct api_msg_msg {
|
||||
struct {
|
||||
const void *dataptr;
|
||||
int len;
|
||||
u8_t copy;
|
||||
u8_t apiflags;
|
||||
} w; /* do_write */
|
||||
struct {
|
||||
u16_t len;
|
||||
|
||||
@@ -132,6 +132,7 @@ struct linger {
|
||||
#define MSG_WAITALL 0x02 /* Requests that the function block until the full amount of data requested can be returned */
|
||||
#define MSG_OOB 0x04 /* Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */
|
||||
#define MSG_DONTWAIT 0x08 /* Nonblocking i/o for this operation only */
|
||||
#define MSG_MORE 0x10 /* Sender will send more */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -89,8 +89,12 @@ err_t tcp_connect (struct tcp_pcb *pcb, struct ip_addr *ipaddr,
|
||||
struct tcp_pcb * tcp_listen (struct tcp_pcb *pcb);
|
||||
void tcp_abort (struct tcp_pcb *pcb);
|
||||
err_t tcp_close (struct tcp_pcb *pcb);
|
||||
|
||||
#define TCP_WRITE_FLAG_COPY 0x01
|
||||
#define TCP_WRITE_FLAG_MORE 0x02
|
||||
|
||||
err_t tcp_write (struct tcp_pcb *pcb, const void *dataptr, u16_t len,
|
||||
u8_t copy);
|
||||
u8_t apiflags);
|
||||
|
||||
void tcp_setprio (struct tcp_pcb *pcb, u8_t prio);
|
||||
|
||||
@@ -483,7 +487,7 @@ struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg);
|
||||
|
||||
err_t tcp_send_ctrl(struct tcp_pcb *pcb, u8_t flags);
|
||||
err_t tcp_enqueue(struct tcp_pcb *pcb, void *dataptr, u16_t len,
|
||||
u8_t flags, u8_t copy,
|
||||
u8_t flags, u8_t apiflags,
|
||||
u8_t *optdata, u8_t optlen);
|
||||
|
||||
void tcp_rexmit_seg(struct tcp_pcb *pcb, struct tcp_seg *seg);
|
||||
|
||||
Reference in New Issue
Block a user