tcp socket detection problems
Posted: Tue Mar 02, 2004 8:05 pm
Hello Lutz,
Im trying some basic (net-send) and control over (net-sessions) "open ports"
and Im running into a problem.
(1) It seems that newlisp does detect "remote" tcp hangups too late..
(2) (net-sessions) isnot updated when remote peer hangs up.
Here is exmaple #1
---- test ----
(set 'server (net-listen 1234))
(println (net-sessions))
(set 'conn (net-accept server))
(println (net-sessions))
----
> (load "test")
(4)
*** I now connect with a remote telnet to port 1234 ***
(5 4)
true
> (net-send 5 "hello")
5
*** here I disconnect the remote CLIENT ***
*** Still newlisp seems an open socket ***
> (net-send 5 "hello")
5
> (net-send 5 "hello")
5
> (net-send 5 "hello")
Broken pipe
$shell>
*** see the broken pipe above, its always after 2x sending towards
*** a remote peer which is already gone
*** problem number #2 is that (net-sessions) is not updated when
*** a remote peer hangs up the connection.
*** im not sure if there is a difference in behaviour running in console
*** mode or running from file execution.
Hope you have an idea on the above...
Regards,
Norman.
Im trying some basic (net-send) and control over (net-sessions) "open ports"
and Im running into a problem.
(1) It seems that newlisp does detect "remote" tcp hangups too late..
(2) (net-sessions) isnot updated when remote peer hangs up.
Here is exmaple #1
---- test ----
(set 'server (net-listen 1234))
(println (net-sessions))
(set 'conn (net-accept server))
(println (net-sessions))
----
> (load "test")
(4)
*** I now connect with a remote telnet to port 1234 ***
(5 4)
true
> (net-send 5 "hello")
5
*** here I disconnect the remote CLIENT ***
*** Still newlisp seems an open socket ***
> (net-send 5 "hello")
5
> (net-send 5 "hello")
5
> (net-send 5 "hello")
Broken pipe
$shell>
*** see the broken pipe above, its always after 2x sending towards
*** a remote peer which is already gone
*** problem number #2 is that (net-sessions) is not updated when
*** a remote peer hangs up the connection.
*** im not sure if there is a difference in behaviour running in console
*** mode or running from file execution.
Hope you have an idea on the above...
Regards,
Norman.