NetApp_ClientStreamOpen

Connect a client to a server using an IP address (IPv4 or IPv6) with a stream socket.

Files

net_app.h/net_app.c

Prototype

 

NET_SOCK_ID  NetApp_ClientStreamOpen (CPU_INT08U               *p_addr,
                                      NET_IP_ADDR_FAMILY        addr_family,
                                      NET_PORT_NBR              remote_port_nbr,
                                      NET_SOCK_ADDR            *p_sock_addr,
                                      NET_APP_SOCK_SECURE_CFG  *p_secure_cfg,
                                      CPU_INT32U                req_timeout_ms,
                                      NET_ERR                  *p_err)

 

Arguments

p_addrPointer to variable that contains IP address of the remote host.
addr_familyIP address contained in the address.
remote_port_nbrPort 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_secure_cfg

Pointer to the secure configuration (TLS/SSL):

DEF_NULL, if no security enabled.

Pointer to a structure that contains the TLS/SSL parameters, if the TLS/SSL must be active on the connection.

req_timeout_msConnection timeout in ms.
p_errPointer 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.