Hi,
> I have edited your code. It is working fine, except for few changes.
Thanks. However, my original email was essentially a bug report, not a
request for help with my code. I didn't actually say "bug report" because
so many bug reports end up just being problems with people's code.
Hi Dustin Lang,
I have edited your code. It is working fine,
except for few changes.
The sender to the same port you are listening to
else you will get a time out error.
Instead of socket.getLocalAddress().getHostAddress()
use InetAddress. getLocalhost(). The former gives 0.0.0.0.
Hi again,
Further to my previous message. It seems that the sending thread is also
bothered by the receiving thread. The first send() succeeds, but once the
receive thread touches the socket, all further send()s fail with
"IOException: Connection refused". This is a DatagramSocket! I was und
In the C world you need to set the SO_REUSEADDR option on
the datagram (UDP) socket.
The setReuseAddress() has been added to JDK 1.4 for this purpose.
I'm not sure how you can go about this in JDK1.2.
Alexander
On Sun, Sep 23, 2001 at 09:56:25PM -0700, Dustin Lang wrote:
>
> Hi,
>
> I checked
Hi,
I checked the archives but didn't find anything that sounds like this...
For a homework assignment I have to write a datagram-driven client and
server pair. They are meant to be used by higher-level classes to handle
the underlying communication.
The client sends out numbered requests and