Try using just the fns in sockets.pp,you have there (almost) all you need; in order to use accept() , you need to bind the socket and you can specify the port in the bind() call. Bogdan.