Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Embed: (wiki syntax)

« Back to documentation index

UDP Methods

UDP Methods
[Socket]

UDP methods. More...

Functions

WiconnectResult udpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort, uint16_t localPort=SOCKET_ANY_PORT GPIO_IRQ_ARG_NC)
 Connect to remote UDP server.
WiconnectResult udpListen (WiconnectUdpServer &udpServer, uint16_t listeningPort)
 Start a UDP server listening on the given port.

Detailed Description

UDP methods.


Function Documentation

WiconnectResult udpConnect ( WiconnectSocket socket,
const char *  host,
uint16_t  remortPort,
uint16_t  localPort = SOCKET_ANY_PORT GPIO_IRQ_ARG_NC 
) [inherited]

Connect to remote UDP server.

Parameters:
[out]socketUDP WiconnectSocket object of opened connection.
[in]hostThe host/IP address of the remote UDP server
[in]remortPortThe port of the remote server
[in]localPortOptional, port of module's side of the connection
[in]irqPinOptional, Data available external interrupt pin. See registerSocketIrqHandler() for more info
Returns:
Result of method. See WiconnectResult
WiconnectResult udpListen ( WiconnectUdpServer udpServer,
uint16_t  listeningPort 
) [inherited]

Start a UDP server listening on the given port.

Parameters:
[out]udpServerUDP WiconnectUdpServer object listening server
[in]listeningPortThe port the UDP server listens on
Returns:
Result of method. See WiconnectResult