lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix spelling mistakes
[lcore.git]
/
lsocket.pas
diff --git
a/lsocket.pas
b/lsocket.pas
index b493ccda8285e4c6a8ebb5a957d9aa8873d10850..4596f6b938129c268b9481200bfd15b20accf3ba 100644
(file)
--- a/
lsocket.pas
+++ b/
lsocket.pas
@@
-22,7
+22,7
@@
changes by beware (20030903)
\r
beware (20030905)
\r
* if connect failed (conn refused) set state to connected and call internalclose, to get closed handler (instead of fdclose)
\r
\r
beware (20030905)
\r
* if connect failed (conn refused) set state to connected and call internalclose, to get closed handler (instead of fdclose)
\r
-* (lcore) if closing the fd's in internalc
ose, set fd'
s to -1 because closing an fd makes it invalid
\r
+* (lcore) if closing the fd's in internalc
lose, set fd
s to -1 because closing an fd makes it invalid
\r
\r
beware (20030927)
\r
* fixed: on connect failed, tried to close fdhandle's which were already set to -1, added check
\r
\r
beware (20030927)
\r
* fixed: on connect failed, tried to close fdhandle's which were already set to -1, added check
\r
@@
-93,7
+93,7
@@
type
\r
//host : THostentry ;
\r
\r
\r
//host : THostentry ;
\r
\r
- //mainthread : boolean ; //for debuggin only
\r
+ //mainthread : boolean ; //for debuggin
g
only
\r
addr:thostname;
\r
port:ansistring;
\r
localaddr:thostname;
\r
addr:thostname;
\r
port:ansistring;
\r
localaddr:thostname;
\r
@@
-497,7
+497,7
@@
esocketexception.create('unable to listen');
if fdhandlein >= 0 then begin
\r
{one *can* get here without fd -beware}
\r
eventcore.rmasterclr(fdhandlein);
\r
if fdhandlein >= 0 then begin
\r
{one *can* get here without fd -beware}
\r
eventcore.rmasterclr(fdhandlein);
\r
- myfdclose(fdhandlein); // we musnt leak file d
i
scriptors
\r
+ myfdclose(fdhandlein); // we musnt leak file d
e
scriptors
\r
eventcore.setfdreverse(fdhandlein,nil);
\r
fdhandlein := -1;
\r
end;
\r
eventcore.setfdreverse(fdhandlein,nil);
\r
fdhandlein := -1;
\r
end;
\r
@@
-532,7
+532,7
@@
end;
\r
function tlsocket.accept : longint;
\r
var
\r
\r
function tlsocket.accept : longint;
\r
var
\r
- FromAddrSize : LongInt; // i don't realy know what to do with these at this
\r
+ FromAddrSize : LongInt; // i don't real
l
y know what to do with these at this
\r
FromAddr : TInetSockAddrV; // at this point time will tell :)
\r
a:integer;
\r
begin
\r
FromAddr : TInetSockAddrV; // at this point time will tell :)
\r
a:integer;
\r
begin
\r
@@
-556,11
+556,11
@@
begin
if result = -1 then begin
\r
raise esocketexception.create('error '+inttostr({$ifdef mswindows}getlasterror{$else}socketerror{$endif})+' while accepting');
\r
end;
\r
if result = -1 then begin
\r
raise esocketexception.create('error '+inttostr({$ifdef mswindows}getlasterror{$else}socketerror{$endif})+' while accepting');
\r
end;
\r
- if result > absol
o
utemaxs then begin
\r
+ if result > absolutemaxs then begin
\r
myfdclose(result);
\r
a := result;
\r
{ result := -1;}
\r
myfdclose(result);
\r
a := result;
\r
{ result := -1;}
\r
- raise esocketexception.create('file d
i
scriptor out of range: '+inttostr(a));
\r
+ raise esocketexception.create('file d
e
scriptor out of range: '+inttostr(a));
\r
end;
\r
end;
\r
\r
end;
\r
end;
\r
\r
@@
-673,14
+673,14
@@
begin
exit;
\r
end;
\r
if (state =wsconnecting) and writetrigger then begin
\r
exit;
\r
end;
\r
if (state =wsconnecting) and writetrigger then begin
\r
- // code for dealing with the reults of a non-blocking connect is
\r
+ // code for dealing with the re
s
ults of a non-blocking connect is
\r
// rather complex
\r
// rather complex
\r
- // if just write is triggered it means connect suceeded
\r
+ // if just write is triggered it means connect suc
c
eeded
\r
// if both read and write are triggered it can mean 2 things
\r
// if both read and write are triggered it can mean 2 things
\r
- // 1: connect ok and data avail
i
ble
\r
+ // 1: connect ok and data avail
a
ble
\r
// 2: connect fail
\r
// to find out which you must read from the socket and look for errors
\r
// 2: connect fail
\r
// to find out which you must read from the socket and look for errors
\r
- // there if we read successfully we drop through into the code for fir
e
ing
\r
+ // there if we read successfully we drop through into the code for firing
\r
// the read event
\r
if not readtrigger then begin
\r
state := wsconnected;
\r
// the read event
\r
if not readtrigger then begin
\r
state := wsconnected;
\r
@@
-697,7
+697,7
@@
begin
exit;
\r
end;
\r
// if things went well here we are now in the state wsconnected with data sitting in our receive buffer
\r
exit;
\r
end;
\r
// if things went well here we are now in the state wsconnected with data sitting in our receive buffer
\r
- // so we drop down into the processing for data avail
i
ble
\r
+ // so we drop down into the processing for data avail
a
ble
\r
end;
\r
if fdhandlein >= 0 then begin
\r
if state = wsconnected then begin
\r
end;
\r
if fdhandlein >= 0 then begin
\r
if state = wsconnected then begin
\r