When a client socket connects to a server socket, but doesn't send any data, ReceiveNetworkData() returns a '-1', instead of 0, even though the socket is still connected.
Please see towards the bottom of: http://purebasic.fr/english/viewtopic.p ... 30#p390130
and: http://purebasic.fr/english/viewtopic.p ... 31#p390131
ReceiveNetworkData() returns -1, should be 0
- RichAlgeni
- Addict
- Posts: 935
- Joined: Wed Sep 22, 2010 1:50 am
- Location: Bradenton, FL
Re: ReceiveNetworkData() returns -1, should be 0
Second, it would be nice if ReceiveNetworkData() returns 0 if no bytes are received. And -1 for everything else (errors). Returning -1 by default only makes using the function that much more difficult when it comes to error handling.
Its Not A Bug, Its An Undocumented Feature!
Relax Its All Just Ones And Zeros
There Is No Place Like 127.0.0.1 Except ::1
I do things TO my computer, not WITH my computer... I am a nerd.
Relax Its All Just Ones And Zeros
There Is No Place Like 127.0.0.1 Except ::1
I do things TO my computer, not WITH my computer... I am a nerd.
- RichAlgeni
- Addict
- Posts: 935
- Joined: Wed Sep 22, 2010 1:50 am
- Location: Bradenton, FL
Re: ReceiveNetworkData() returns -1, should be 0
I decided that this is a bug, as it does not correspond to the documentation. So I created a bug report under Windows.