M
M Maloney
Hey everyone,
I am relatively new to java network programming, and I need a
bit of help with this task I am doing to help me learn network
programming.
To start off with I am writing some simple programs. All I want
to do to begin is implement a client and iterative server using UDP.
The client asks for time of day, and the server should reply with time
of day - then both terminate connections and clean up.
I am having troubles getting started - I know I have to use
DatagramSocket, and DatagamPacket - but how do I connect the client to
the server and which host/port do I use? I don't want to connect to an
internet server, just the server I create. Also, how can I send
packets to and from server and client - as in how do I know who I'm
sending to?
If anyone could show me how its done, I would be very grateful.
Thanks for your time and help, M.Maloney
I am relatively new to java network programming, and I need a
bit of help with this task I am doing to help me learn network
programming.
To start off with I am writing some simple programs. All I want
to do to begin is implement a client and iterative server using UDP.
The client asks for time of day, and the server should reply with time
of day - then both terminate connections and clean up.
I am having troubles getting started - I know I have to use
DatagramSocket, and DatagamPacket - but how do I connect the client to
the server and which host/port do I use? I don't want to connect to an
internet server, just the server I create. Also, how can I send
packets to and from server and client - as in how do I know who I'm
sending to?
If anyone could show me how its done, I would be very grateful.
Thanks for your time and help, M.Maloney