UDPSockets

Archives Forums/BlitzMax Bug Reports/UDPSockets

Silver_Knee(Posted 2011) [#1]
1) You should make a notice in the docs that an UDPSocket wants you to read the whole package at once, otherwise it will fail.
2) There is no way to find out the sender ip/port from an incoming UDP-Package. There is a c-function for it but it's not implementated in TSocket yet:

recvfrom_(_socket,buf,ReadAvail(),0,senderip,senderport)

For this you need to buffer the received data. ([url=http://www.blitzforum.de/forum/viewtopic.php?t=36521]my solution (GER)[/url] was a automatic buffering Stream, working similar to the Streams of B3D/BPlus)