| Author |
A problem of "ServerSocket" on Linux
|
Hogan Wang
Greenhorn
Joined: Dec 17, 2006
Posts: 1
|
|
|
I created a server class with ServerSocket, and run it on Linux (in daemon), however, when the Linux is rebooted, the client side could not feel it. It is still pending at "read" method instead of -1 returned from the method. It works when it is not run in daemon. Why?
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24059
|
|
Hi, Welcome to JavaRanch! I'm not sure what running "in daemon" means -- automatically? Via inetd? In the background? You can use "telnet" on the Linux machine to talk directly to your server program; that might be a good way to debug this: telnet localhost port (where port is the port number you are trying to run the server on.) Does this connect? Does it respond the way you expect if you type something? Until this works, you're obviously not going to be able to use the Java client.
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: A problem of "ServerSocket" on Linux
|
|
|