98
edits
RossyMiles (talk | contribs) No edit summary |
RossyMiles (talk | contribs) mNo edit summary |
||
Line 33: | Line 33: | ||
Destroys a UDP socket created with NetUDPSocket_Create. | Destroys a UDP socket created with NetUDPSocket_Create. | ||
bool '''NetUDPSocket_Send('''int '''socket''', | bool '''NetUDPSocket_Send('''int '''socket''', sockaddr* '''address''', const char* '''data''', uint16_t '''datalen)'''<br> | ||
Sends a packet of data to the specified address using the specified socket. To broadcast a message across a LAN (such as when checking for available games), send it to 255.255.255.255 (IPv4 only). | Sends a packet of data to the specified address using the specified socket. To broadcast a message across a LAN (such as when checking for available games), send it to 255.255.255.255 (IPv4 only). | ||
Line 45: | Line 45: | ||
Starts a new UDP server on the specified port which calls '''packet_callback''' when a packet is recieved. Does not return until the server has finished running ('''packet_callback''' returns false). | Starts a new UDP server on the specified port which calls '''packet_callback''' when a packet is recieved. Does not return until the server has finished running ('''packet_callback''' returns false). | ||
bool '''NetUDPServer_Send(''' | bool '''NetUDPServer_Send('''sockaddr* '''address''', const char* '''data''', uint16_t '''datalen)'''<br> | ||
Sends a packet of data to the specified address using the server running on the current thread. This function should only be called from '''packet_callback''' or functions called by '''packet_callback'''. | Sends a packet of data to the specified address using the server running on the current thread. This function should only be called from '''packet_callback''' or functions called by '''packet_callback'''. |
edits