X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/03b75b4c964d8b3ac97d4007f0e033549b01c92f..9763940f8849e5c807566157829a1e6d2c9172ee:/lsocket.pas diff --git a/lsocket.pas b/lsocket.pas index b493ccd..4596f6b 100644 --- a/lsocket.pas +++ b/lsocket.pas @@ -22,7 +22,7 @@ changes by beware (20030903) beware (20030905) * if connect failed (conn refused) set state to connected and call internalclose, to get closed handler (instead of fdclose) -* (lcore) if closing the fd's in internalcose, set fd's to -1 because closing an fd makes it invalid +* (lcore) if closing the fd's in internalclose, set fds to -1 because closing an fd makes it invalid beware (20030927) * fixed: on connect failed, tried to close fdhandle's which were already set to -1, added check @@ -93,7 +93,7 @@ type //host : THostentry ; - //mainthread : boolean ; //for debuggin only + //mainthread : boolean ; //for debugging only addr:thostname; port:ansistring; localaddr:thostname; @@ -497,7 +497,7 @@ esocketexception.create('unable to listen'); if fdhandlein >= 0 then begin {one *can* get here without fd -beware} eventcore.rmasterclr(fdhandlein); - myfdclose(fdhandlein); // we musnt leak file discriptors + myfdclose(fdhandlein); // we musnt leak file descriptors eventcore.setfdreverse(fdhandlein,nil); fdhandlein := -1; end; @@ -532,7 +532,7 @@ end; function tlsocket.accept : longint; var - FromAddrSize : LongInt; // i don't realy know what to do with these at this + FromAddrSize : LongInt; // i don't really know what to do with these at this FromAddr : TInetSockAddrV; // at this point time will tell :) a:integer; begin @@ -556,11 +556,11 @@ begin if result = -1 then begin raise esocketexception.create('error '+inttostr({$ifdef mswindows}getlasterror{$else}socketerror{$endif})+' while accepting'); end; - if result > absoloutemaxs then begin + if result > absolutemaxs then begin myfdclose(result); a := result; { result := -1;} - raise esocketexception.create('file discriptor out of range: '+inttostr(a)); + raise esocketexception.create('file descriptor out of range: '+inttostr(a)); end; end; @@ -673,14 +673,14 @@ begin exit; end; if (state =wsconnecting) and writetrigger then begin - // code for dealing with the reults of a non-blocking connect is + // code for dealing with the results of a non-blocking connect is // rather complex - // if just write is triggered it means connect suceeded + // if just write is triggered it means connect succeeded // if both read and write are triggered it can mean 2 things - // 1: connect ok and data availible + // 1: connect ok and data available // 2: connect fail // to find out which you must read from the socket and look for errors - // there if we read successfully we drop through into the code for fireing + // there if we read successfully we drop through into the code for firing // the read event if not readtrigger then begin state := wsconnected; @@ -697,7 +697,7 @@ begin exit; end; // if things went well here we are now in the state wsconnected with data sitting in our receive buffer - // so we drop down into the processing for data availible + // so we drop down into the processing for data available end; if fdhandlein >= 0 then begin if state = wsconnected then begin