In "httpproxy" demo application from synapse library is the following code:

procedure TServiceThread.Execute;
var  sock: TTCPBlockSocket;
     ClientSock: TSocket;
begin
  sock := TTCPBlockSocket.Create;
  try
    sock.bind('0.0.0.0','3128');
    if sock.LastError <> 0 then begin WriteLog('!!! BIND failed !!!'); Exit; 
end;
    sock.setLinger(true,10000);
    sock.listen;
    repeat
      if terminated then break;
      if sock.canread(1000) then
      begin
        //new connection... launch TTCPHttpThrd
        ClientSock := sock.accept;
        if sock.lastError = 0 then TTCPHttpThrd.create(ClientSock);
      end;
    until false;
  finally
    sock.free;
  end;
end;


I want to know what IP should I put in the Bind method if I run this server on 
my computer and I want others to connect to the internet through it. It must be 
my IP ?
And what does SetLinger method do ? I read the documentation but I did not 
understand.
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to