NetBurner 3.5.0
PDF Version |
|
NetBurner TCP API. More...
Go to the source code of this file.
Typedefs | |
typedef void | tcp_notify_handler(int tcpFd) |
TCP notification callback type. | |
Functions | |
int | accept (int listening_socket, IPADDR *address, uint16_t *port, uint16_t timeout) |
Accept an incoming connection from a listening socket. | |
int | accept (int listening_socket, IPADDR *address, uint16_t *port, TickTimeout &timeout) |
Accept an incoming connection from a listening socket. | |
int | connect (const IPADDR &ipAddress, uint16_t remotePort, uint32_t timeout) |
Make an outgoing TCP connection to a remote host. | |
int | connectvia (const IPADDR &ipAddress, uint16_t remotePort, uint32_t timeout, const IPADDR &localIpAddress) |
Make an outgoing TCP connection to a remote host using the specified local interface IP address. | |
int | connectvia (const IPADDR &ipAddress, uint16_t remotePort, uint32_t timeout, int ifnum) |
Make an outgoing TCP connection to a remote host using the specified local interface number. | |
int | connectwlocal (const IPADDR &ipAddress, uint16_t localPort, uint16_t remotePort, uint32_t timeout, const IPADDR &localIpAddress=IPADDR::NullIP(), int intf=-1) |
Make an outgoing TCP connection to a remote host using the specified local interface number or IP address. | |
int | listen (const IPADDR &addr, uint16_t port, uint8_t maxpend=5) |
Listen for incoming connections on the specified network interface IP address. | |
int | listenvia (const IPADDR &addr, uint16_t port, int ifn, uint8_t maxpend=5) |
Listen for incoming connections on the specified network interface IP address. | |
int | listenvia (const IPADDR &addr, uint16_t port, const IPADDR &localIpAddress, uint8_t maxpend=5) |
Listen for incoming connections on the specified network interface IP address. | |
int | NoBlockConnect (const IPADDR &ipAddress, uint16_t remotePort) |
Create a file descriptor for a TCP connection and return immediately. This function does not wait for a connection to be established. Before using the file descriptor, the application must verify the connection was successful with TcpGetSocketState(fd). The state will be TCP_STATE_ESTABLISHED when the connection has been successfully established. Note: The connection status can also be obtained with the wireavail() function. | |
int | NoBlockConnectVia (const IPADDR &ipAddress, uint16_t remotePort, const IPADDR &interfaceIpAddress=IPADDR::NullIP()) |
Create a file descriptor for a TCP connection and return immediately. This function does not wait for a connection to be established. Before using the file descriptor, the application must verify the connection was successful with TcpGetSocketState(fd). The state will be TCP_STATE_ESTABLISHED when the connection has been successfully established. Note: The connection status can also be obtained with the wireavail() function. | |
int | NoBlockConnectVia (const IPADDR &ipAddress, uint16_t remotePort, int ifnum) |
Create a file descriptor for a TCP connection and return immediately. This function does not wait for a connection to be established. Before using the file descriptor, the application must verify the connection was successful with TcpGetSocketState(fd). The state will be TCP_STATE_ESTABLISHED when the connection has been successfully established. Note: The connection status can also be obtained with the wireavail() function. | |
int | NoBlockConnectwlocal (const IPADDR &ipAddress, uint16_t localPort, uint16_t remotePort, IPADDR interfaceIpAddress=IPADDR::NullIP(), int ifn=-1) |
Create a file descriptor for a TCP connection and return immediately. This function does not wait for a connection to be established. Before using the file descriptor, the application must verify the connection was successful with TcpGetSocketState(fd). The state will be TCP_STATE_ESTABLISHED when the connection has been successfully established. Note: The connection status can also be obtained with the wireavail() function. | |
IPADDR | GetSocketRemoteAddr (int fd) |
Returns the IP address of the remote host associated with the specified file descriptor. | |
IPADDR | GetSocketLocalAddr (int fd) |
Returns the IP address of the local interface associated with the connection. | |
uint16_t | GetSocketRemotePort (int fd) |
Returns the port number of the remote host associated with the connection. | |
uint16_t | GetSocketLocalPort (int fd) |
Returns the local port number associated with the connection. | |
uint32_t | TcpGetLastRxTime (int fd) |
Returns the value of system Time Ticks when the last packet was received. Used for the TCP Keep Alive feature. | |
void | TcpSendKeepAlive (int fd) |
Send a TCP keep alive packet to a remote host. | |
uint32_t | TcpGetLastRxInterval (int fd) |
Returns the number of system Time Ticks since the last packet was received. This is the difference between the current system time and lastRxTime of the socket. | |
int | GetTcpRtxCount (int fd) |
Returns the number of re-transmits that have occurred on the specified connection. | |
uint8_t | SetOutOfOrderBuffers (int fd, uint8_t max) |
Set the maximum number of out-of-order TCP buffers for the specified TCP socket. | |
int | setsockoption (int fd, int option) |
Set TCP socket options. | |
int | clrsockoption (int fd, int option) |
Clear TCP socket options. | |
int | getsockoption (int fd) |
Returns the options for the specified TCP socket. | |
int | SetSocketUnackBuffers (int fd, uint8_t val) |
Set the maximum number of outbound TCP buffers in the transmit un-acknowledged list for the specified TCP socket. | |
int | SetSocketRxBuffers (int fd, int n) |
Set the number of TCP receive buffers for the specified TCP socket. | |
int | SetSocketTxBuffers (int fd, int n) |
Set the number of TCP transmit buffers for the specified TCP socket. | |
int | abortsocket (int fd) |
Execute an abort on the specified TCP socket. | |
int | SockReadWithTimeout (int fd, char *buf, int nbytes, uint32_t timeout) |
Attempt to read from a TCP socket until the timeout expires. | |
char | SocketPeek (int fd) |
Returns the next char that would be read, 0 if no data. | |
int | TcpGetSocketInterface (int fd) |
Return the network interface associated with a TCP socket. | |
uint8_t | TcpGetSocketState (int fd) |
Return the current state of a TCP socket. | |
uint16_t | TcpGetRxBufferSpaceUsed (int fd) |
Returns the number of bytes used in a socket's RX buffer. | |
uint16_t | TcpGetTxBufferAvailSpace (int fd) |
Returns the number of bytes available in a socket's TX buffer. | |
uint16_t | TcpGetTxDataWaiting (int fd) |
Returns the number of bytes waiting to be sent in a socket's TX Buffer. | |
BOOL | TcpAllDataAcked (int socket) |
Check the data acknowledged state of a socket. | |
BOOL | WaitForSocketFlush (int fd, uint32_t ticks) |
Wait for a socket flush operation to complete. A socket is flushed if all sent data has been acknowledged. | |
void | RegisterTCPReadNotify (int tcpFd, tcp_notify_handler *notifyHandler) |
Register a TCP socket and callback function for read notifications. | |
void | RegisterTCPWriteNotify (int tcpFd, tcp_notify_handler *notifyHandler) |
Register a TCP socket and callback function for write notifications. | |
NetBurner TCP API.