/ChatRoom_ClientServer

A GUI client application connects the Chat Server to talk with other client application. PyQt5 as GUI, socket/TCP as protocol.

Primary LanguagePython

Client User Interface for Chat Server

Project Information

Implement an user interface for the chat server. This GUI has IP, port and name input line, and able to broadcast, privatly send, receive, and display messages according to the server protocol of string format. Forked from fatliau

Added and/or changed from fork:

  • Uses JSON serialization for sending over data
  • Uses AES/RSA for encrypting messages over TCP
  • Other Bug fixes (like chatbox does not automatically update when untabbed from chat)
  • Name duplicates will now be rejected.

Environment Requirement

  • Python 3.6
  • PyQt5
  • PyCryptodome >= 3.11.0

Run the Server

python server.py --host 127.0.0.1 --port 33002

Run the Client User Interface

python chatUI_main.py

Features

General Design

  • tabs for individual function: Home page or chat room
  • chat room tab disabled until connection setup
  • messagebox prompt to confirm exit, and disconnect before exit

Home tab

  • foolproof on connection/disconnection button: name column required, prevent repeat connecting/disconnecting
  • unlimited remaking coonection
  • unvalid port or unvalid IP, set to default IP 127.0.0.1 port 33002
  • no worry refused connection, the exception code deal with it

Chat Room tab

  • message sending by either push GUI button or press keyboard enter
  • clear the LineEdit widget after each message sent
  • real-time received message display
  • message column always scroll down to the newest message
  • private message display on both sender and receiver, with color
  • real-time updating of combobox and attendance list at receiving server broadcast
  • once the receiver left before the private message sent, dispaly "Private message not delivered"
  • window expanding space is preferd for message column
  • EMOJI, that is what chat room ask for

Screenshots

HomePage HomePage HomePage ChatRoom ChatRoom ChatRoom HomePage