44 #define UDP_MAX_PACKET (503) 50 #define UDP_MAX_DATA (488)
_DN_EXP_UDP HRESULT udp_send(int sock, const char *buf, uint32_t len_buf, void *arg)
Sends UDP packet.
A type definition for parameters of udp_send and udp_recv.
_DN_EXP_UDP HRESULT udp_clear(int sock, uint32_t timeout)
Clears the received buffer.
_DN_EXP_UDP HRESULT udp_set_timeout(int sock, uint32_t timeout)
Sets timeout value to the UDP socket.
_DN_EXP_UDP HRESULT udp_check_sockaddr(const struct sockaddr_in *sock_to, const struct sockaddr_in *sock_from)
Checks the socket address. If sock_to and sock_from are equivalent, then returns S_OK.
_DN_EXP_UDP HRESULT udp_open(void *param, int *sock)
Opens UDP socket.
_DN_EXP_UDP HRESULT udp_recv(int sock, char *buf, uint32_t len_buf, uint32_t *len_recved, uint32_t timeout, void *arg)
Receives UDP packet.
_DN_EXP_UDP HRESULT udp_close(int *sock)
Closes the socket.