I have a socket server running and listening for incoming connections on a non-admin port (i.e. > 1024). I would also like for this process to be able to handle another type of connection on a different port for monitoring purposes. I have found questions on SE for the opposite situation, many-to-one but this would be a one-to-many situation.
My questions: Is it possible to bind one process to multiple ports?
If so can I reliably handle connections on the different ports uniquely (i.e. port 2000 execute one piece of code and port 3000 execute another).
I am open to other suggestions as to how to handle a connection to monitor the other clients that are that are connecting to the primary port.