coding a fork example to work with multiple connections at the same time on sockets