mirror of
https://github.com/Kiritow/LuaEngine.git
synced 2024-03-22 13:11:45 +08:00
17 lines
481 B
C
17 lines
481 B
C
|
#include "Socket.h"
|
||
|
|
||
|
/*
|
||
|
class UDPSocket
|
||
|
constructor()
|
||
|
close()
|
||
|
setblocking(nonblocking: boolean)
|
||
|
setbroadcast(isbroadcast: boolean) Broadcast default to false.
|
||
|
listen([ip: string], port: int) Address default to 0.0.0.0.
|
||
|
|
||
|
connect(ip: string, port: int)
|
||
|
send(data: string)
|
||
|
recv([maxsize: int]): string. Default to 4KB.
|
||
|
sendto([ip: string], port: int, data: string) If ip is empty, default to 255.255.255.255 (broadcast)
|
||
|
recvfrom(): data: string, ip: string, port: int
|
||
|
*/
|