Example #1
0
    def __init__(self, username, password, localAddress, remoteServerPort):
        """ Create a local server and a local client for the chat and start GUI """

        # Create a local client and a local server as we are peer to peer
        self.__client = ChatClient(localAddress, remoteServerPort, username,
                                   password, self)
        self.__server = ChatServer(localAddress, username, self)

        # Start GUI
        self.__gui = EurechatInterface(username, localAddress,
                                       remoteServerPort)
        curses.wrapper(self.__gui.start)

        # Authenticate the user and bind to port for chatting
        self.__client.authenticate()
Example #2
0
 def buildProtocol(self, addr):
     return ChatClient()