implemented simple select() socket server for listening for incoming commands