Forums Register Login

simple socket mechanism

+Pie Number of slices to send: Send
Hi, I am totally new with Sockets.

Firstly, please have a look at the code.

Server


Client


I start Server through: java Server
Next I open the second console and I start client: java Client
And I get java.net.UnknownHostException: 0.0.0.0/0.0.0.0

What is wrong?
+Pie Number of slices to send: Send
0.0.0.0 is not the address of the localhost; try 127.0.0.1.
+Pie Number of slices to send: Send
OK, thanks. It works.
But toString() method of SocketServer printed that the host address is: 0.0.0.0, so what about that?
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1302 times.
Similar Threads
ServerSocket crash with Thread
Socket
Why should I use a new Socket to interrupt serverSocket.accept() ?
help:'no stack trace available'
Doubt in ServerSocket and Socket
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 03:52:47.