static inline void append_sendbuffer_udp(struct socket_server *ss, struct socket *s, int priority, struct request_send * request, const uint8_t udp_address[UDP_ADDRESS_SIZE]) { struct wb_list *wl = (priority == PRIORITY_HIGH) ? &s->high : &s->low; struct write_buffer *buf = append_sendbuffer_(ss, wl, request, SIZEOF_UDPBUFFER, 0); memcpy(buf->udp_address, udp_address, UDP_ADDRESS_SIZE); s->wb_size += buf->sz; }
static inline void append_sendbuffer_low(struct socket *s, struct request_send * request) { s->wb_size += append_sendbuffer_(&s->low, request, 0); }
static inline void append_sendbuffer(struct socket *s, struct request_send * request, int n) { s->wb_size += append_sendbuffer_(&s->high, request, n); }
// 加入低优先级链表缓冲区 static inline void append_sendbuffer_low(struct socket_server *ss,struct socket *s, struct request_send * request) { struct write_buffer *buf = append_sendbuffer_(ss, &s->low, request, SIZEOF_TCPBUFFER, 0); s->wb_size += buf->sz; }