Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 May : Synapse SendStreamRaw
| Subject: | Synapse SendStreamRaw |
| Posted by: | "Stefan Meisner" (stefan.meisn..@gmx.net) |
| Date: | Fri, 25 May 2007 07:04:33 |
Hello!
I am converting a project from using Borland Socket Components to use
Synapse. One issue I have not yet solved is the following: I do have a
client application which does send data to a server. Now at some point the
server shuts down. My problem is that Socket.SendStreamRaw does not indicate
that the remote host is down. There's no exception and Socket.LastError is
0. The code I am using looks like
Assert(FSocket <> nil);
Result := FSocket.CanWrite(CCanRWTimeOut);
if Result then
begin
FSocket.SendStreamRaw(AStream);
Result := FSocket.LastError = 0;
end;
The same code using Borland Socket components looks like:
Assert(FSocket <> nil);
Result := FSocket.SendStream(AStream);
How can I detect that sending of the given data did fail?
Thanks for your help!
Viele Grüsse
Stefan Meisner
www.delphi-online.at
Delphi Remoting Components
Delphi Memory Profiler