CSE691/891 - Internet Programming Summer 2001
prev

Lab Assignment #6

This is a lab assignment for the Sockets Programming Lecture, week #6. Please start by copying the Chat Prototype folder from the class account, e.g.:
\\ecshome1\handouts\fawcett\Internet Programming\lecture6\Chat Prototype
to your home directory.
  1. Log onto two machines and establish a chat session. Send a couple of messages back and forth. You may team up with a fellow student to do this if you wish.

  2. Add code to the chat functions in form1 to trap errors. Use message boxes to tell the user what the problem is, and how to fix it.

  3. Add a new form to the project that contains a listbox. Provide a caption above the listbox that indicates this is a list of on-line chatters.

  4. This task will add functionality that you will need for the final project.

    1. Set up a database, just like you did last week. Provide fields for Name and IP address. Put two or three hypothetical records in the database, e.g., make up names and IP addresses.

    2. Have your application connect to the database on Form Load and insert your name and IP address into the database. Show all the database records in your listbox, then close the connection.

    3. When you close your application, connect to the database and remove your entry.

    Note that this chat prototype can only connect to one other chat program. We will extend its functionality next week to allow multiple connections for instructor to students communication.
prev