opening sockets in modules