Embedded WebSockets Experiment

Dependencies:   mbed MD5

Embed: (wiki syntax)

« Back to documentation index

netconn Struct Reference

netconn Struct Reference

A netconn descriptor. More...

#include <api.h>

Data Fields

enum netconn_type type
 type of the netconn (TCP, UDP or RAW)
enum netconn_state state
 current state of the netconn
err_t err
 the last error this netconn had
sys_sem_t op_completed
 sem that is used to synchroneously execute functions in the core context
sys_mbox_t recvmbox
 mbox where received packets are stored until they are fetched by the netconn application thread (can grow quite big)
sys_mbox_t acceptmbox
 mbox where new connections are stored until processed by the application thread
int socket
 only used for socket layer
int recv_timeout
 timeout to wait for new data to be received (or connections to arrive for listening netconns)
int recv_bufsize
 maximum amount of bytes queued in recvmbox
struct api_msg_msgwrite_msg
 TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message.
size_t write_offset
 TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores how much is already sent.
u8_t write_delayed
 TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores whether to wake up the original application task if data couldn't be sent in the first try.
netconn_callback callback
 A callback function that is informed about events for this netconn.

Detailed Description

A netconn descriptor.

Definition at line 109 of file api.h.


Field Documentation

sys_mbox_t acceptmbox

mbox where new connections are stored until processed by the application thread

Definition at line 130 of file api.h.

netconn_callback callback

A callback function that is informed about events for this netconn.

Definition at line 158 of file api.h.

err_t err

the last error this netconn had

Definition at line 122 of file api.h.

sys_sem_t op_completed

sem that is used to synchroneously execute functions in the core context

Definition at line 124 of file api.h.

maximum amount of bytes queued in recvmbox

Definition at line 140 of file api.h.

timeout to wait for new data to be received (or connections to arrive for listening netconns)

Definition at line 136 of file api.h.

sys_mbox_t recvmbox

mbox where received packets are stored until they are fetched by the netconn application thread (can grow quite big)

Definition at line 127 of file api.h.

int socket

only used for socket layer

Definition at line 132 of file api.h.

enum netconn_state state

current state of the netconn

Definition at line 113 of file api.h.

enum netconn_type type

type of the netconn (TCP, UDP or RAW)

Definition at line 111 of file api.h.

TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores whether to wake up the original application task if data couldn't be sent in the first try.

Definition at line 154 of file api.h.

TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message.

Definition at line 146 of file api.h.

size_t write_offset

TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores how much is already sent.

Definition at line 149 of file api.h.