Skip to content

a bit performance increasing #12

@GoogleCodeExporter

Description

@GoogleCodeExporter

procedure TIocpTcpSocket.RequestAcceptComplete(PerIoData: PIocpPerIoData);
var
  .....
begin
.....
FConnectionList[PerIoData.ClientSocket] := Connection;
FIdleConnectionList.Delete(Connection.FSocket);
Connection.FConnectionSource:=csConnect;
......
end;


procedure TIocpTcpSocket.FreeConnection(Connection: TIocpSocketConnection);
begin
  try
    FConnectionListLocker.Enter;
    if not Connection.FConnectionSource=csConnect then FConnectionList.Delete(Connection.FSocket) 
else
      FIdleConnectionList.Delete(Connection.FSocket);
    FConnectionPool.FreeObject(Connection);
  finally
    FConnectionListLocker.Leave;
  end;
end;

Original issue reported on code.google.com by Hezihang...@gmail.com on 5 Jul 2013 at 12:10

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions