[fpc-pascal] SocketError 183

MegaBrutal megabrutal at gmail.com
Sun Dec 23 14:36:13 CET 2012


Hi all,

For some reason, when I read socketerror after calling fpRecv just after I
established a connection, I get 183, or (on a very rare occasion) 10061. I
couldn't find what 183 is supposed to mean, but 10061 is "connection
refused", which is strange because it's not applicable to the situation
(because I verified that the connection is established correctly, and
fpRecv even returns the data read from the connection).

fpRecv works correctly if I read after I written something first.

I suspect 2 possible causes:
- Is socketerror reset to 0 after a successful socket operation? Actually,
I call fpRecv and then try to verify if it was successful by examining
socketerror.
- Is socketerror thread-safe? My application is multi-threaded - maybe it
reads the result of another thread's socket operation.


Greetings,
MegaBrutal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20121223/b4035949/attachment.html>


More information about the fpc-pascal mailing list