epergola epergola at hotmail.com
Fri Aug 21 18:48:08 CEST 2009

Sorry, you are right.
I am using non blocking sockets (lNet library), no visual package, on the
side, attempting to communicate with a non blocking (Delphi) socket on my
Everything works fine (did a lot of data send and receive) except that 
fpconnect with correct address (PC computer name) and port number still
Hence, this lines in the lNet lib (modified by me)
if SetupSocket(APort, Address) then begin
    i:=fpConnect(FHandle, psockaddr(@FAddress), SizeOf(FAddress));
    if i>=0 then
      FConnecting := True;
    Result := FConnecting;
will always return false for the Connect function.
The original code in lNet was
if SetupSocket(APort, Address) then begin
    pConnect(FHandle, psockaddr(@FAddress), SizeOf(FAddress));
    FConnecting := True;
    Result := FConnecting;
which always returned TRUE, even when fpconnect fails;
Any idea as to what I may check (beside the return code of fpconnect which
does not work)
to see if the conneccion actually took place?

more information
linux? windows?
blocking or nonblocking sockets?

View this message in context: http://www.nabble.com/FPCONNECT-NOT-WORKING--tp25073238p25083432.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

More information about the fpc-pascal mailing list