De Anza Logo

CIS 75 Internet Programming With TCP/IP
 

Home .
Syllabus .
Course Schedule .
 

 

Assignment One

A Simple Sockets Application


You are to implement a simple client/server application using sockets. The server manages the bank account of a customer.

The application shall enable a customer (client) to do the following:

  1. Deposit funds
  2. Withdraw funds
  3. Display the balance they have in that account

The server shall provide the following functionality:

  1. The bank shall manage exactly one account.
  2. The balance of the account is a 4-byte long, signed integer.
  3. The account is initialized to 0 when the bank starts.
  4. The bank allows the following operations:
    o void deposit(int)
    o void withdraw(int)
    o int balance()

The client and server shall use sockets to communicate with each other.

Before you begin coding, think carefully about the protocol of your application.

The client shall be implemented in C NOT C++ (using UNIX sockets),

The server shall be implemented in C.

Never code C in C++. They are two different languages.

You must use Linux or other UNIX variant.

You must use Gnu gcc.

Please submit an explicit description of the protocol you have implemented along with your documentation.

Please be sure to check the general guidelines for submitting your project.

For information on how to submit your assignment see submission instructions

Must be emailed BEFORE class on Wednesday 24 April