63 typedef int (* tcp_socket_data_callback_t)(
struct tcp_socket *s,
65 const uint8_t *input_data_ptr,
79 typedef void (* tcp_socket_event_callback_t)(
struct tcp_socket *s,
81 tcp_socket_event_t event);
84 struct tcp_socket *next;
86 tcp_socket_data_callback_t input_callback;
87 tcp_socket_event_callback_t event_callback;
92 uint8_t *input_data_ptr;
93 uint8_t *output_data_ptr;
95 uint16_t input_data_maxlen;
96 uint16_t input_data_len;
97 uint16_t output_data_maxlen;
98 uint16_t output_data_len;
99 uint16_t output_data_send_nxt;
100 uint16_t output_senddata_len;
101 uint16_t output_data_max_seg;
104 uint16_t listen_port;
109 TCP_SOCKET_FLAGS_NONE = 0x00,
110 TCP_SOCKET_FLAGS_LISTENING = 0x01,
111 TCP_SOCKET_FLAGS_CLOSING = 0x02,
150 int tcp_socket_register(
struct tcp_socket *s,
void *ptr,
151 uint8_t *input_databuf,
int input_databuf_len,
152 uint8_t *output_databuf,
int output_databuf_len,
153 tcp_socket_data_callback_t data_callback,
154 tcp_socket_event_callback_t event_callback);
175 int tcp_socket_connect(
struct tcp_socket *s,
176 const uip_ipaddr_t *
ipaddr,
197 int tcp_socket_listen(
struct tcp_socket *s,
211 int tcp_socket_unlisten(
struct tcp_socket *s);
228 int tcp_socket_send(
struct tcp_socket *s,
229 const uint8_t *dataptr,
243 int tcp_socket_send_str(
struct tcp_socket *s,
257 int tcp_socket_close(
struct tcp_socket *s);
271 int tcp_socket_unregister(
struct tcp_socket *s);
285 int tcp_socket_max_sendlen(
struct tcp_socket *s);
297 int tcp_socket_queuelen(
struct tcp_socket *s);
static uip_ipaddr_t ipaddr
Pointer to prefix information option in uip_buf.
Representation of a uIP TCP connection.
Header file for the uIP TCP/IP stack.