lwIP  2.0.1
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

sys_mbox_t netconn::acceptmbox

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

netconn_callback netconn::callback

A callback function that is informed about events for this netconn

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.

u8_t netconn::flags

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

err_t netconn::last_err

the last error this netconn had

s16_t netconn::linger

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

sys_sem_t netconn::op_completed

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

union { ... } netconn::pcb

the lwIP internal protocol control block

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

int netconn::recv_bufsize

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

sys_mbox_t netconn::recvmbox

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

s32_t netconn::send_timeout

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

int netconn::socket

only used for socket layer

enum netconn_state netconn::state

current state of the netconn

enum netconn_type netconn::type

type of the netconn (TCP, UDP or RAW)

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: