El Wed, 27 Feb 2008 12:04:22 -0700 L <[EMAIL PROTECTED]> escribió: > > While using synapse in a thread, I saw that it didn't report an > > error > on connection, > > eventually I saw that the call to WSAGetLastError was returning 0 > even if it couldn't > > connect and the connect call returned an error. > > I am also working on this issue still. > > I had the WSAGetLastError working using direct sockets.pp calls but > didn't get it working using synapse yet.. but I didn't try very hard > and that is one of my tasks this week. I think there is something in > synapse possibly which still may be causing the issue, such as maybe > wsagetlasterror not being stored in a temporary variable.. but I > think it is and will have to cheeck (i.e. maybe similar to the > writeln issue where writeln doesn't store it in tmp var first).
I don't think that synapse is to blame[*]: my test program is also using the sockets unit directly, and stores SocketError (which just calls WSAGetLastError) in a variable. What really puzzles me is that project3 (your test program modified to use tthread and to do a connect instead of a bind) works while project2 doesn't. Maybe I've been staring at them for too long, but I cannot see the difference. [*]apart that you can only know that a socket operation was successful by checking LastError. Bye -- Luca _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal