I think Synapse is still alive. You can find the current code in SVN.
https://synalist.svn.sourceforge.net/svnroot/synalist/trunk/
But i also use the release 38 on Windows and Linux without any problems.
The most common reason for your problem is that the socket was not
complete closed
before you try to re-open it.
The following will help you tieh that issue, especially on Linux:
EnableReuse(true);
Here some sample code from my listener thread:
//------------------------------------------------------------------------------
procedure TSmtpListener.Execute;
var
Socket: TSocket;
begin
try
fSocket.CreateSocket;
fSocket.SetLinger(True, 10);
fSocket.EnableReuse(true);
fSocket.Bind(fIP, IntToStr(fPort));
// On bind failure try to rebind every second
while fSocket.LastError <> 0 do
begin
if ( Terminated ) then
Exit;
sleep(1000);
fSocket.Bind(fIP, IntToStr(fPort));
end;
// Listen
fSocket.Listen;
while not Terminated do
begin
// Waiting for a new connection from a mailclient
Socket := fSocket.Accept;
if (Socket <> INVALID_SOCKET) and (fSocket.LastError = 0) then
begin
if assigned(fOnConnect) then
fOnConnect(Self, Socket);
end;
end;
// Close socket
fSocket.CloseSocket;
except on E:Exception do
raise Exception.Create ('TSmtpListener.Execute:' + E.Message);
end;
end;
Denis Gottardello schrieb:
> Is Synapse alive? There is no new version from 2007-12-21.
>
> I have a problem with TTCPBlockSocket, sometimes the socket does not coming
> open. (Under Windows and Linux.) What can I do?
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public