List Info

Thread: NETWORK_STREAM_SOCKET




NETWORK_STREAM_SOCKET
country flaguser name
United States
2007-04-09 19:11:20

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?

__._,_.___
.

__,_._,___
RE: NETWORK_STREAM_SOCKET
country flaguser name
United States
2007-04-10 02:55:27

> 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.

Regards,
Manu

__._,_.___
.

__,_._,___
RE: NETWORK_STREAM_SOCKET
country flaguser name
United States
2007-04-10 11:15:40

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

__._,_.___
.

__,_._,___
RE: NETWORK_STREAM_SOCKET
country flaguser name
United States
2007-04-11 03:51:23

> OUR_SERVER does not throw an exception and happily prints "Server:
> 0123456789" after the client application has already exited.

As far as I can tell, we use the send C routine and if it does not return a
negative value, then no exception will be thrown.

> 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?

This is not under the control of EiffelNet, this is a machine/OS specific
setting.

Regards,
Manu

__._,_.___
.

__,_._,___
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )