Added functions for server sockets