# Class ClientProtocol

java.lang.Object
com.sparshui.common.ClientProtocol

Direct Known Subclasses:
  `ClientToServerProtocol, ServerToClientProtocol`

public abstract class ClientProtocol extends Object
The abstract class for the client protocol that defines members common to both the server-side and client-side protocols.

Author:
  Tony Ross

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`ClientProtocol.MessageType`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected DataInputStream`
`_in`
`protected DataOutputStream`
`_out`
`protected Socket`
`_socket`

## Constructor Summary

Constructors
Constructor
Description
`ClientProtocol(Socket socket)`
Create a new ClientProtocol object.

## Method Summary

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### _socket

protected Socket _socket

### _in

protected DataInputStream _in

### _out

protected DataOutputStream _out

## Constructor Details

### ClientProtocol

public ClientProtocol(Socket socket) throws IOException
Create a new ClientProtocol object.

Parameters:
  `socket` - The socket that has been opened.
Throws:
  `IOException` - If there is a communication error.