def server_bind(self):
        """
        Override server_bind to store the server name, even in IronPython.

        See https://ironpython.codeplex.com/workitem/29477
        """
        TCPServer.server_bind(self)
        host, port = self.socket.getsockname()[:2]
        self.server_port = port
        try:
            self.server_name = socket.getfqdn(host)
        except ValueError:
            # Use the local host name in case of error, like CPython does
            self.server_name = socket.gethostname()
def server_bind ( self ) : TCPServer . server_bind ( self ) host , port = self . socket . getsockname ( ) [ : 2 ] self . server_port = port try : self . server_name = socket . getfqdn ( host ) except ValueError : self . server_name = socket . gethostname ( )
Override server_bind to store the server name, even in IronPython.

        See https://ironpython.codeplex.com/workitem/29477