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
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal