Connect a client to a server using an IP address (IPv4 or IPv6) with a datagram socket
Files
net_app.h/net_app.c
Prototype
Code Block |
---|
NET_SOCK_ID NetApp_ClientDatagramOpen (CPU_INT08U *p_addr,
NET_IP_ADDR_FAMILY addr_family,
NET_PORT_NBR remote_port_nbr,
NET_SOCK_ADDR *p_sock_addr,
NET_ERR *p_err) |
Arguments
p_addr | Pointer to variable that contains IP address of the remote host. |
addr_family | IP address contained in the address. |
remote_port_nbr | Port of the remote host. |
p_sock_addr | Pointer to a variable that will receive the socket address of the remote host. (Can be set to DEF_NULL if the returned value is not required). |
p_err | Pointer to variable that will receive the return error code from this function. |
Returned Value
Socket ID, if no errors,
NET_SOCK_ID_NONE, otherwise.
Required Configuration
None.
Notes / Warnings
None.