At 12:55 AM 4/10/2007, you wrote:
> > Is there anyway to determine if a call to
> > NETWORK_STREAM_SOCKET.put_string was not successful, or if
> > less than the full string was actually send to the peer?
>
>Currently, if the call is successful it will not throw an exception,
>that is to
>say if no exception occurs it is successful.
NETWORK_STREAM_SOCKET does not detect a broken pipe. I modified the
two machine example as follows:
{OUR_CLIENT}.process is
do
soc1.put_string ("0123456789")
soc1.close
end
{OUR_SERVER}.process is
local
counter: INTEGER
do
soc1.accept
soc2 ?= soc1.accepted
soc2.read_stream (10)
from
until
counter > 10000000
loop
counter := counter + 1
end
soc2.put_string (soc2.last_string)
io.put_string ("Server: " + soc2.last_string)
end
OUR_SERVER does not throw an exception and happily prints "Server:
0123456789" after the client application has already exited.
Another issue: It takes quite a while (30-60 seconds) after a server
application has ended before it can be restarted on the same
port. Is there any way to shorten this interval?
Thanks,
Neal
.