Chat Client - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Chat Client

Description:

Connect to custom chat server. Send and receive simple text messages ... Chat style interface. Overview of Sockets ... Enforce advanced chat rules. Encrypt ... – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 8
Provided by: michael1501
Category:
Tags: chat | client

less

Transcript and Presenter's Notes

Title: Chat Client


1
Chat Client
  • ACM
  • 15 October 2003

2
Goals
  • Connect to custom chat server
  • Send and receive simple text messages
  • Inform user of connection and disconnection

3
Implementation
  • .NET Application written in C
  • Swing Application written in Java
  • Sockets for network interface
  • Multi-threaded application for asynchronously
    receiving messages
  • Chat style interface

4
Overview of Sockets
  • End-point of a two-way communication link between
    networked applications
  • Used to send and receive data
  • Available in many languages
  • C, Perl, C, Java, etc.
  • Two types of socket operations
  • Blocking
  • Non-blocking
  • We will use blocking operations in conjunction
    with multi-threading

5
Overview of Multi-threading
  • Multiple concurrent paths of execution in a
    single process
  • Much more difficult than single threaded
    programming
  • No guarantee on thread execution order
  • No guarantee on time slice size
  • We will use one extra thread to perform blocking
    operations

6
Chat Style Interface
  • Chat window must scroll with incoming text
  • C
  • Win32 API messages must be sent to and received
    from a RichTextBox control
  • Message swapping functions must be imported
    (DllImport)
  • Java
  • JTextPane.setCaretPosition(DocumentLength)

7
Improvements
  • Server
  • Use multiple ports to communicate efficiently
    with clients
  • Pass XML instead of simple text
  • Add ability to login
  • Send text colors and fonts
  • Enforce advanced chat rules
  • Encrypt messages
  • Client
  • Interpret incoming message as XML and process
    accordingly
  • Gracefully deal with failed connections
  • Allow for custom colors and fonts
Write a Comment
User Comments (0)
About PowerShow.com