Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

serverSocket question

 
Drake Almonto
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When this command is encountered:
"ServerSocket ss = new ServerSocket(8189)"
the following message is produced:
"invalid argument: listen failed"

Can anyone help?

public SocketServer() throws IOException {
Socket client;
ServerSocket ss = new ServerSocket(8189);
while (true) {
client = ss.accept();
SocketSkeleton skel = new SocketSkeleton(client);
addClient(skel;
skel.start();
}
}
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ensure that no one else is using
the port 8189 on your machine. Or change
the port number to somethign that you can use.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!