[fpc-pascal] SocketError 183
Ewald
ewald at yellowcouch.org
Sun Dec 23 17:02:37 CET 2012
Once upon a time, on 12/23/2012 02:36 PM to be precise, MegaBrutal said:
> 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).
>
And what does fpRecv() return? Does it return something >= 0? In that
case the error comes from somewhere else.
As to your question wether SocketError() is thread-safe. On *nix (tested
on Mac OS X 10.6.8 and several Linuxes) it is, I'm using this function
in a multithreaded server and it's results are consistent with what I
expect on a per-thread basis.
--
Ewald
More information about the fpc-pascal
mailing list