61 typedef int (* tcp_socket_data_callback_t)(
struct tcp_socket *s,
63 const uint8_t *input_data_ptr,
77 typedef void (* tcp_socket_event_callback_t)(
struct tcp_socket *s,
79 tcp_socket_event_t event);
82 struct tcp_socket *next;
84 tcp_socket_data_callback_t input_callback;
85 tcp_socket_event_callback_t event_callback;
90 uint8_t *input_data_ptr;
91 uint8_t *output_data_ptr;
93 uint16_t input_data_maxlen;
94 uint16_t input_data_len;
95 uint16_t output_data_maxlen;
96 uint16_t output_data_len;
97 uint16_t output_data_send_nxt;
100 uint16_t listen_port;
105 TCP_SOCKET_FLAGS_NONE = 0x00,
106 TCP_SOCKET_FLAGS_LISTENING = 0x01,
107 TCP_SOCKET_FLAGS_CLOSING = 0x02,
146 int tcp_socket_register(
struct tcp_socket *s,
void *ptr,
147 uint8_t *input_databuf,
int input_databuf_len,
148 uint8_t *output_databuf,
int output_databuf_len,
149 tcp_socket_data_callback_t data_callback,
150 tcp_socket_event_callback_t event_callback);
171 int tcp_socket_connect(
struct tcp_socket *s,
172 uip_ipaddr_t *ipaddr,
193 int tcp_socket_listen(
struct tcp_socket *s,
207 int tcp_socket_unlisten(
struct tcp_socket *s);
224 int tcp_socket_send(
struct tcp_socket *s,
225 const uint8_t *dataptr,
239 int tcp_socket_send_str(
struct tcp_socket *s,
253 int tcp_socket_close(
struct tcp_socket *s);
267 int tcp_socket_unregister(
struct tcp_socket *s);
Representation of a uIP TCP connection.