UDP is much simpler than TCP, but I can't seem to find a good example of it.
UDP is connectionless. It only sends data to an IP address. So I don't understand why so many UDP examples use ConnectSocket(), especially when the docs themselves say ConnectSocket() is for TCP sockets only.
What I really want is something like this:
socket:TSocket=CreateUDPSocket()
BindSocket(socket,80)
socket.send ip$,port:int,data:byte ptr,size:int
So how is this done?
UDP is connectionless. It only sends data to an IP address. So I don't understand why so many UDP examples use ConnectSocket(), especially when the docs themselves say ConnectSocket() is for TCP sockets only.
What I really want is something like this:
socket:TSocket=CreateUDPSocket()
BindSocket(socket,80)
socket.send ip$,port:int,data:byte ptr,size:int
So how is this done?