Versions in this module Expand all Collapse all v1 v1.0.0 May 29, 2020 Changes in this version + const BufSize + const CHECK_TIMEOUTS_INTERVAL + const LWIP_ERR_ABRT + const LWIP_ERR_OK + const TCP_POLL_INTERVAL + var OutputFn func([]byte) (int, error) + func FreeBytes(b []byte) + func FreeConnKeyArg(p unsafe.Pointer) + func GetConnKeyVal(p unsafe.Pointer) uint32 + func GetSyncMapLen(m sync.Map) int + func IPAddrATON(cp string, addr *C.struct_ip_addr) + func IPAddrNTOA(ipaddr C.struct_ip_addr) string + func Input(pkt []byte) (int, error) + func NewBytes(size int) []byte + func NewConnKeyArg() unsafe.Pointer + func NewLWIPError(code int) error + func Output(p *C.struct_pbuf) C.err_t + func ParseTCPAddr(addr string, port uint16) net.Addr + func ParseUDPAddr(addr string, port uint16) net.Addr + func RegisterOutputFn(fn func([]byte) (int, error)) + func RegisterTCPConnectionHandler(h ConnectionHandler) + func RegisterUDPConnectionHandler(h ConnectionHandler) + func SetBufferPool(p *sync.Pool) + func SetConnKeyVal(p unsafe.Pointer, val uint32) + func SetTCPAcceptCallback(pcb *C.struct_tcp_pcb) + func SetTCPErrCallback(pcb *C.struct_tcp_pcb) + func SetTCPPollCallback(pcb *C.struct_tcp_pcb, interval C.u8_t) + func SetTCPRecvCallback(pcb *C.struct_tcp_pcb) + func SetTCPSentCallback(pcb *C.struct_tcp_pcb) + func SetUDPRecvCallback(pcb *C.struct_udp_pcb, recvArg unsafe.Pointer) + func TCPAcceptFn(arg unsafe.Pointer, newpcb *C.struct_tcp_pcb, err C.err_t) C.err_t + func TCPErrFn(arg unsafe.Pointer, err C.err_t) + func TCPPollFn(arg unsafe.Pointer, tpcb *C.struct_tcp_pcb) C.err_t + func TCPRecvFn(arg unsafe.Pointer, tpcb *C.struct_tcp_pcb, p *C.struct_pbuf, err C.err_t) C.err_t + func TCPSentFn(arg unsafe.Pointer, tpcb *C.struct_tcp_pcb, len C.u16_t) C.err_t + func UDPRecvFn(arg unsafe.Pointer, pcb *C.struct_udp_pcb, p *C.struct_pbuf, addr *C.ip_addr_t, ...) + type Connection interface + Abort func() + Close func() error + Err func(err error) + LocalAddr func() net.Addr + LocalDidClose func() error + Poll func() error + Receive func(data []byte) error + RemoteAddr func() net.Addr + Sent func(len uint16) error + Write func(data []byte) (int, error) + func NewTCPConnection(pcb *C.struct_tcp_pcb, handler ConnectionHandler) (Connection, error) + func NewUDPConnection(pcb *C.struct_udp_pcb, handler ConnectionHandler, ...) (Connection, error) + type ConnectionHandler interface + Connect func(conn Connection, target net.Addr) error + DidClose func(conn Connection) + DidReceive func(conn Connection, data []byte) error + DidSend func(conn Connection, len uint16) + LocalDidClose func(conn Connection) + type LWIPStack interface + Close func() error + RestartTimeouts func() + Write func([]byte) (int, error) + func NewLWIPStack() LWIPStack