# Class ClientToServerProtocol

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

public class ClientToServerProtocol extends ClientProtocol
ClientToServerProtocol implements the Client side protocol. It is the interface between Client.java and the lower level socket calls to communicate with the Gesture Server. adapted by Bob Hanson for Jmol 11/29/2009

Author:
  Jay Roltgen

## Nested Class Summary

### Nested classes/interfaces inherited from class ClientProtocol

`ClientProtocol.MessageType`

## Field Summary

### Fields inherited from class ClientProtocol

`_in, _out, _socket`

## Constructor Summary

Constructors
Constructor
Description
`ClientToServerProtocol(Socket socket)`
Constructor calls ClientProtocol's constructor and sets up data input and output streams for the specified socket.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`processRequest(SparshClient client)`
Processes a request from the Gesture Server

### Methods inherited from class Object

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

## Constructor Details

### ClientToServerProtocol

public ClientToServerProtocol(Socket socket) throws IOException
Constructor calls ClientProtocol's constructor and sets up data input and output streams for the specified socket.

Parameters:
  `socket` - The socket that is connected to the Gesture Server.
Throws:
  `IOException` - If there is a communication error.

## Method Details

### processRequest

public boolean processRequest(SparshClient client)
Processes a request from the Gesture Server

Parameters:
  `client` - The Client object that the server wants to communicate with.
Returns:
  true for success, false for failure