31 #include <netinet/in.h>
int udp_socket_send(struct UdpSocket *sock, uint8_t *buffer, uint32_t len)
Send a packet from buffer, blocking.
int udp_socket_send_dontwait(struct UdpSocket *sock, uint8_t *buffer, uint32_t len)
Send a packet from buffer, non-blocking.
int udp_socket_recv_dontwait(struct UdpSocket *sock, uint8_t *buffer, uint32_t len)
Receive a UDP packet, dont wait.
int udp_socket_create(struct UdpSocket *sock, char *host, int port_out, int port_in, bool broadcast)
Create UDP network (in/out sockets).
int udp_socket_set_recvbuf(struct UdpSocket *sock, int buf_size)
struct sockaddr_in addr_in
struct sockaddr_in addr_out
int udp_socket_recv(struct UdpSocket *sock, uint8_t *buffer, uint32_t len)
Receive one UDP packet.
int udp_socket_subscribe_multicast(struct UdpSocket *sock, const char *multicast_addr)