lcore,sysutils,\r
classes,pgtypes,bfifo,\r
{$ifndef nosignal}\r
- lsignal;\r
+ lsignal,\r
{$endif}\r
+ ltimevalstuff;\r
\r
{$include unixstuff.inc}\r
-{$include ltimevalstuff.inc}\r
\r
const\r
absoloutemaxs_select = (sizeof(fdset)*8)-1;\r
end;\r
temptimer := currenttimer;\r
currenttimer := currenttimer.nexttimer;\r
- if temptimer.released then temptimer.free;\r
end;\r
end;\r
\r
end;\r
end;\r
\r
- if asinreleaseflag then begin\r
- asinreleaseflag := false;\r
- currentsocket := firstasin;\r
- while assigned(currentsocket) do begin\r
- tempsocket := currentsocket;\r
- currentsocket := currentsocket.nextasin;\r
- if tempsocket.released then begin\r
- tempsocket.free;\r
- end;\r
- end;\r
- end;\r
{\r
!!! issues:\r
- sockets which are released may not be freed because theyre never processed by the loop\r
repeat\r
\r
//the message loop will exit if all lasio's and ltimer's and lsignal's are destroyed\r
- if (not assigned(firstasin)) and (not assigned(firsttimer)) {$ifndef nosignal} and (not assigned(firstsignal)){$endif} then exit;\r
- {fd_zero(FDSR);\r
- fd_zero(FDSW);\r
- currentsocket := firstasin;\r
- if not assigned(currentsocket) then exit; //the message loop will exit if all lsockets are destroyed\r
-\r
- repeat\r
- if (not currentsocket.released) and (currentsocket.state<>wsclosed) then fd_set(currentsocket.fdhandlein,fdsr);\r
- if (not currentsocket.released) and (currentsocket.state=wsconnecting) then fd_set(currentsocket.fdhandleout,fdsw);\r
- if currentsocket is tlsocket then begin\r
- if (not currentsocket.released) and (currentsocket.state=wsconnected) and(tlsocket(currentsocket).sendq <> '') then fd_set(currentsocket.fdhandleout,fdsw);\r
- end;\r
- tempsocket := currentsocket;\r
- currentsocket := currentsocket.nextasin;\r
- if tempsocket.released then begin\r
- tempsocket.free;\r
- end;\r
- until not assigned(currentsocket);\r
- }\r
processtasks;\r
//currenttask := nil;\r
{beware}\r