When I do: Socket initializeNetwork. s _ Socket new connectTo: (NetNameResolver addressFromString: '127.0.0.1') port: 2001. It always returns a connected socket even when there is no socket listening on 2001. (s waitForConnectionUntil: Socket standardDeadline) returns true right away. It is not until I attempt to send data that its status changes from connected to otherEndClosedButNotThisEnd and an error is raised.
I am the only one having Linux socket problems? Can anyone repeat this problem or the problem I posted on March 23 entitled "[BUG]Socket waits unnecessarily in linux"?
Thanks, Anthony
Image version: Squeak3.1alpha of 27 February 2001 latest update: #3848 VM version: Squeak3.1alpha of 27 February 2001 [latest update: #3776] for: unix
On Saturday 19 February 2000 00:04, ajh18@cornell.edu wrote:
I am the only one having Linux socket problems? Can anyone repeat this problem or the problem I posted on March 23 entitled "[BUG]Socket waits unnecessarily in linux"?
My system (3.0pre2 VM, up-to-date image) behaves exactly as you describe.
Since you sent this message over a year ago, though, I figure you've already fixed the problem. What did you have to do to fix it <g>?
ajh18@cornell.edu writes:
When I do: Socket initializeNetwork. s _ Socket new connectTo: (NetNameResolver addressFromString: '127.0.0.1') port: 2001. It always returns a connected socket even when there is no socket listening on 2001. (s waitForConnectionUntil: Socket standardDeadline) returns true right away. It is not until I attempt to send data that its status changes from connected to otherEndClosedButNotThisEnd and an error is raised.
I am the only one having Linux socket problems? Can anyone repeat this problem or the problem I posted on March 23 entitled "[BUG]Socket waits unnecessarily in linux"?
I've repeated this problem on SuSE Linux 6.3 running Squeak 2.7 with changes up to 1782.
Jim
ajh18@cornell.edu wrote:
When I do: Socket initializeNetwork. s _ Socket new connectTo: (NetNameResolver addressFromString: '127.0.0.1') port: 2001. It always returns a connected socket even when there is no socket listening on 2001. (s waitForConnectionUntil: Socket standardDeadline) returns true right away. It is not until I attempt to send data that its status changes from connected to otherEndClosedButNotThisEnd and an error is raised.
I am the only one having Linux socket problems? Can anyone repeat this problem or the problem I posted on March 23 entitled "[BUG]Socket waits unnecessarily in linux"?
It's been long known, but no one has ever fixed it. The kernel only tells the VM that the connection has completed, and doesn't tell it whether it completed *successfully*. Or at least, the current VM isn't reading the kernel's signals.
There is a connectHandler() function that handles this response. If you or anyone can fix it, that would be terrific.
-Lex
squeak-dev@lists.squeakfoundation.org