Simple TCP/UDP server that listens on port 8080 and echos back the received message. This is intended to be used as a simple test server for network programming to demonstrate the use of TCP and UDP sockets on the same port at the same time.
Build and run the server (select either DualSocketServer or MinaDualSocketServer):
mvn clean package
java -jar target/dualserver-1.0-SNAPSHOT.jar [DualSocketServer|MinaDualSocketServer]That will start the server listening on port 8080 for both TCP and UDP connections; it will echo back any message received.
TCP test with netcat
nc localhost 8080UDP test with netcat
nc -u localhost 8080