- update "should i release stream" topic?

- review: maxDataCacheSize - global or for session? should be global, same for filecache

- if task dublicates have been sent, and task is finished - cancel all dublicates

- backup coordinator  - if other coordinator is running, goto backup mode

- Win 2000/ XP sp1 support;

- C support

- 64 bit support. Review: possibly IPC?
>>Does anyone know anything about 64 bit Delphi compiler ?
>> I think for 2008. 
>If they wait a bit longer they could skip 64 bit altogether and go for 128

- only single griduser can be run on current PC because of fixed user_Data_port
  1) try to bind on any available port from arange, send it to agent when connecting
  2) create broadcast server socket only while broadcasting; recreate on failure

- option: low priority while compressing task instream

- better TASK_FAILED and errors handling

- refactor: remove peer and workerthread from tasklistdata -> parent2, parent3

- track network and memory load:
  1) when sending inStream;
  2) when sending outStream;

- security: execute (save to disk) dll modules only with known MD5 checksums on agent. keystore implementation.
For best security, agents shoud run DLLs only with allowed MD5 checksums. Collection of MD5 checksums should be added to keystore of every agent in the grid manually. 
Also agent can canculate checksum and ask user "Do you allow to run xxx task from IP xx.xx.xx.xx?. Do not ask in the future []".

- chm help


-----------------------------------------------------
          Terminate;
          FEvent.SetEvent;   для того, чтобы закрутить среды из кеша
          if (ClientSocket <> nil) and ClientSocket.Connected then
            ClientSocket.Close; закрыть сокет, чтобы вызвать ошибку сокета 
                                в активных средах и клиент завершился 
                                по terminate
          WaitFor;

Thread заверашется и вызывает

  FClientSocket.Free;    (1)
  FClientSocket := nil;

в то же время TServerWinSocket.Disconnect пытается закрыть сокет:

          if (ClientSocket <> nil) and ClientSocket.Connected then  (2)
            ClientSocket.Close;

поскольку 
  FClientSocket.Free;
  FClientSocket := nil;
- не атомартая операция, может произойти вылет  -
 вызов Close() на несуществующем сокете
 и вылетает в ntdll при попытке использовать критическую секцию сокета
внутри tcustomwinsocket.disconnect.lock


решение: обернуть (1) и (2) в критическую секцию



procedure TServerWinSocket.Disconnect(Socket: TSocket);
var
  SaveCacheSize: Integer;
begin
  Lock;
  try
    SaveCacheSize := ThreadCacheSize;
    try
      ThreadCacheSize := 0;
      while FActiveThreads.Count > 0 do
        with TServerClientThread(FActiveThreads.Last) do
        begin
          FreeOnTerminate := False;
          Terminate;
          FEvent.SetEvent;
          if (ClientSocket <> nil) and ClientSocket.Connected then
            ClientSocket.Close;
          WaitFor;
          Free;
        end;

function TServerClientThread.EndConnect: Boolean;
begin
  FClientSocket.Free;
  FClientSocket := nil;
  Result := Terminated or not KeepInCache;
end;



I read in the doc you were trying to find how to control the close socket time that Windows uses. This situation is really annoying when you debug.. If you halt 30 seconds then the socket will be closed automatically due to TCP-ack-response timeout. 

I think you can control this with the SO_LINGER option of the setsockopt() Winsock function ( and pass in the l_linger field the timeout in miliseconds) . In that way you could decide when to close or keep alive a few the TCP connections. Also sure you use SO_KEEPALIVE. 

Also remind to set the recv/send timeout correctly with SO_RCVTIMEO and SO_SNDTIMEO