I am writing a network backend for a game server.
I planned on using multicast, so that clients could bind to the server via a multicast socket. The server could then send game updates to all members of the group.
I'm wondering, however, if it's possible to do the reverse — can clients send unicast data to the server, over the same port as the multicast socket?
I've written a test program based off of the Java Tutorials (which only sends server —> client), but I was unable to adapt that to bidirectional communication. I'm getting Address already in use and Not a multicast address errors on the client.
Are my suspicions correct that such bidirectional communications are not possible using the same port? Must I use different ports (one for multicast [server —> clients], one for unicast [clients —> server])?
(I'm doing this in Java, but I'm more interested in the network-side-of-things is this possible vs. implementation-side how do I do this.)