I wrote > I am calling LastError right after the .Bind call on the next line > So you're right it shouldn't be the CanRead interfering as suggested. > > I am playing with the synapse sources to see what I can find.. >
Simple writeln('DEBUG ') always works for me.. procedure TBlockSocket.Bind(IP, Port: string); var Sin: TVarSin; begin writeln('DEBUG ', FLastError); FLastError := 0; if (FSocket <> INVALID_SOCKET) or not((FFamily = SF_ANY) and (IP = cAnyHost) and (Port = cAnyPort)) then begin SetSin(Sin, IP, Port); if FLastError = 0 then begin if FSocket = INVALID_SOCKET then InternalCreateSocket(Sin); //SockCheck(synsock.Bind(FSocket, Sin)); // shows -1 if apache is running! 0 if it isn't!!!! This is good news writeln('DEBUG: ', synsock.Bind(FSocket, Sin)); GetSinLocal; FBuffer := ''; FBinded := True; end; ExceptCheck; DoStatus(HR_Bind, IP + ':' + Port); end; end; The bad news: So the question is.. how come SockCheck isn't getting set to -1 When my WriteLn is... ? Hmm.. more testing ;-) L505 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public