Java Communication Demo

An UDP communication application between the server and the client


This is the coursework of the Java Programming course. The work was finished by Lingbin Ni.

The complete code for the project can be found here.

Coursework requirements


Data sending and receiving (format and data customization), user interface customization;

One receiver, one sender; After receiving the message sent by the sender, the receiver prints the sent message along with the sender's address and port number, and then feeds back the message "Received!" to the sender;

The sender prints out the feedback message from the receiver.

Program code


Getter

The complete code for the project can be found here.

Sender

The complete code for the project can be found here.

Operating instructions

Run the getter first, then run the sender.

Running results


Sender.java displays:

Feedback message: Received!

Getter.java displays:

Message: hello, world!

IP address: 127.0.0.1

Port number: 49194