lwIP  2.0.2
Lightweight IP stack
netconn Struct Reference

#include <api.h>

Data Fields

enum netconn_type type
 
enum netconn_state state
 
union {
pcb
 
err_t last_err
 
sys_sem_t op_completed
 
sys_mbox_t recvmbox
 
sys_mbox_t acceptmbox
 
int socket
 
s32_t send_timeout
 
int recv_bufsize
 
int recv_avail
 
s16_t linger
 
u8_t flags
 
size_t write_offset
 
struct api_msgcurrent_msg
 
netconn_callback callback
 

Detailed Description

A netconn descriptor

Field Documentation

◆ acceptmbox

sys_mbox_t netconn::acceptmbox

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

◆ callback

netconn_callback netconn::callback

A callback function that is informed about events for this netconn

◆ current_msg

struct api_msg* netconn::current_msg

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.

◆ flags

u8_t netconn::flags

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

◆ last_err

err_t netconn::last_err

the last error this netconn had

◆ linger

s16_t netconn::linger

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

◆ op_completed

sys_sem_t netconn::op_completed

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

◆ pcb

union { ... } netconn::pcb

the lwIP internal protocol control block

◆ recv_avail

int netconn::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

◆ recv_bufsize

int netconn::recv_bufsize

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

◆ recvmbox

sys_mbox_t netconn::recvmbox

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

◆ send_timeout

s32_t netconn::send_timeout

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

◆ socket

int netconn::socket

only used for socket layer

◆ state

enum netconn_state netconn::state

current state of the netconn

◆ type

enum netconn_type netconn::type

type of the netconn (TCP, UDP or RAW)

◆ write_offset

size_t netconn::write_offset

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


The documentation for this struct was generated from the following file: