ACKme Logo WiConnect Host Library- API Reference Guide
 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
TCP Methods

TCP methods. More...

Functions

WiconnectResult wiconnect::SocketInterface::tcpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort)
 Connect to remote TCP server. More...
 
WiconnectResult wiconnect::SocketInterface::tcpListen (uint16_t listeningPort, int maxClients=0)
 Start internal TCP server and listen on specified port. More...
 
WiconnectResult wiconnect::SocketInterface::tcpAccept (WiconnectSocket &socket, uint32_t timeoutMs=WICONNECT_WAIT_FOREVER)
 Wait for next client to connect to TCP server. More...
 
WiconnectResult wiconnect::SocketInterface::tcpServerStop (void)
 Stop TCP server from listening on port. Close all connected clients. More...
 

Detailed Description

TCP methods.

Function Documentation

WiconnectResult wiconnect::SocketInterface::tcpAccept ( WiconnectSocket socket,
uint32_t  timeoutMs = WICONNECT_WAIT_FOREVER 
)

Wait for next client to connect to TCP server.

Parameters
[in]socketSocket to connected client
[in]timeoutMsOptional, specifiy maximum amount of time in ms to wait for a client
Returns
Result of method. See WiconnectResult
WiconnectResult wiconnect::SocketInterface::tcpConnect ( WiconnectSocket socket,
const char *  host,
uint16_t  remortPort 
)

Connect to remote TCP server.

Parameters
[out]socketTCP WiconnectSocket object of opened connection.
[in]hostThe host/IP address of the remote TCP server
[in]remortPortThe port of the remote server
[in]irqPinOptional, Data available external interrupt pin. See registerSocketIrqHandler() for more info
Returns
Result of method. See WiconnectResult
WiconnectResult wiconnect::SocketInterface::tcpListen ( uint16_t  listeningPort,
int  maxClients = 0 
)

Start internal TCP server and listen on specified port.

Parameters
[in]listeningPortThe local port the server should listen on
[in]maxClientsOptional, the maximum simultaneous connected clients, 0 is default, 1-8 valid range
[in]irqPinOptional, Data available external interrupt pin. See registerSocketIrqHandler() for more info
Returns
Result of method. See WiconnectResult
WiconnectResult wiconnect::SocketInterface::tcpServerStop ( void  )

Stop TCP server from listening on port. Close all connected clients.

Returns
Result of method. See WiconnectResult