Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

UDP only

UDP only
[Netconn API]

UDP only functions. More...

Functions

err_t netconn_disconnect (struct netconn *conn)
 Disconnect a netconn from its current peer (only valid for UDP netconns).
err_t netconn_sendto (struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port)
 Send data (in form of a netbuf) to a specific remote IP address and port.
err_t netconn_send (struct netconn *conn, struct netbuf *buf)
 Send data over a UDP or RAW netconn (that is already connected).
err_t netconn_join_leave_group (struct netconn *conn, const ip_addr_t *multiaddr, const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave)
 Join multicast groups for UDP netconns.
err_t netconn_join_leave_group_netif (struct netconn *conn, const ip_addr_t *multiaddr, u8_t if_idx, enum netconn_igmp join_or_leave)
 Join multicast groups for UDP netconns.

Detailed Description

UDP only functions.


Function Documentation

err_t netconn_disconnect ( struct netconn conn )

Disconnect a netconn from its current peer (only valid for UDP netconns).

Parameters:
connthe netconn to disconnect
Returns:
See err_t

Definition at line 416 of file lwip_api_lib.c.

err_t netconn_join_leave_group ( struct netconn conn,
const ip_addr_t multiaddr,
const ip_addr_t netif_addr,
enum netconn_igmp  join_or_leave 
)

Join multicast groups for UDP netconns.

Parameters:
connthe UDP netconn for which to change multicast addresses
multiaddrIP address of the multicast group to join or leave
netif_addrthe IP address of the network interface on which to send the igmp message
join_or_leaveflag whether to send a join- or leave-message
Returns:
ERR_OK if the action was taken, any err_t on error

Definition at line 1188 of file lwip_api_lib.c.

err_t netconn_join_leave_group_netif ( struct netconn conn,
const ip_addr_t multiaddr,
u8_t  if_idx,
enum netconn_igmp  join_or_leave 
)

Join multicast groups for UDP netconns.

Parameters:
connthe UDP netconn for which to change multicast addresses
multiaddrIP address of the multicast group to join or leave
if_idxthe index of the netif
join_or_leaveflag whether to send a join- or leave-message
Returns:
ERR_OK if the action was taken, any err_t on error

Definition at line 1230 of file lwip_api_lib.c.

err_t netconn_send ( struct netconn conn,
struct netbuf buf 
)

Send data over a UDP or RAW netconn (that is already connected).

Parameters:
connthe UDP or RAW netconn over which to send data
bufa netbuf containing the data to send
Returns:
ERR_OK if data was sent, any other err_t on error

Definition at line 948 of file lwip_api_lib.c.

err_t netconn_sendto ( struct netconn conn,
struct netbuf buf,
const ip_addr_t addr,
u16_t  port 
)

Send data (in form of a netbuf) to a specific remote IP address and port.

Only to be used for UDP and RAW netconns (not TCP).

Parameters:
connthe netconn over which to send data
bufa netbuf containing the data to send
addrthe remote IP address to which to send the data
portthe remote port to which to send the data
Returns:
ERR_OK if data was sent, any other err_t on error

Definition at line 929 of file lwip_api_lib.c.