Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

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 pending_err
 the last asynchronous unreported error this netconn had
sys_sem_t op_completed
 sem that is used to synchronously 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 mbox_threads_waiting
 number of threads waiting on an mbox.
int socket
 only used for socket layer
s32_t send_timeout
 timeout to wait for sending data (which means enqueueing data for sending in internal buffers) in milliseconds
u32_t recv_timeout
 timeout in milliseconds 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 not used for TCP: adjust TCP_WND instead!
int recv_avail
 number of bytes currently in recvmbox to be received, tested against recv_bufsize to limit bytes on recvmbox for UDP and RAW, used for FIONREAD
s16_t linger
 values <0 mean linger is disabled, values > 0 are seconds to linger
u8_t flags
 flags holding more netconn-internal state, see NETCONN_FLAG_* defines
struct api_msgcurrent_msg
 TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message.
netconn_callback callback
 A callback function that is informed about events for this netconn.

Detailed Description

A netconn descriptor.

Definition at line 218 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 242 of file api.h.

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

Definition at line 285 of file api.h.

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

Also used during connect and close.

Definition at line 282 of file api.h.

u8_t flags

flags holding more netconn-internal state, see NETCONN_FLAG_* defines

Definition at line 277 of file api.h.

s16_t linger

values <0 mean linger is disabled, values > 0 are seconds to linger

Definition at line 274 of file api.h.

number of threads waiting on an mbox.

This is required to unblock all threads when closing while threads are waiting.

Definition at line 247 of file api.h.

sys_sem_t op_completed

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

Definition at line 234 of file api.h.

the last asynchronous unreported error this netconn had

Definition at line 231 of file api.h.

number of bytes currently in recvmbox to be received, tested against recv_bufsize to limit bytes on recvmbox for UDP and RAW, used for FIONREAD

Definition at line 270 of file api.h.

maximum amount of bytes queued in recvmbox not used for TCP: adjust TCP_WND instead!

Definition at line 266 of file api.h.

u32_t recv_timeout

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

Definition at line 261 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 238 of file api.h.

s32_t send_timeout

timeout to wait for sending data (which means enqueueing data for sending in internal buffers) in milliseconds

Definition at line 256 of file api.h.

int socket

only used for socket layer

Definition at line 251 of file api.h.

current state of the netconn

Definition at line 222 of file api.h.

type of the netconn (TCP, UDP or RAW)

Definition at line 220 of file api.h.