ReadLine bug?

BlitzMax Forums/BlitzMax Programming/ReadLine bug?

The only way I found to do this is:
Local bytesbefore:Int = socket.ReadAvail()
Local buffer:TBank = CreateBank(bytesbefore)
Local from_ip:Int,from_port:Int
recvfrom_(socket._socket,buffer.Buf(),bytesbefore,0,from_ip,from_port) 'Function recvfrom_( socket,buf:Byte Ptr,size,flags,sender_ip Var,sender_port Var)
Local bytesafter:Int = socket.ReadAvail()
Local bytesread:Int = bytesbefore-bytesafter
buffer.Resize(szread)
Local data:TBankStream = CreateBankStream(buffer)

After this from_ip contains the sender's IP an from_port contains the sender's port.
You can read your recived data from the BankStream data.

Ps: I hope the Code is ok, id didn't test it.