public class Client extends Object
| Constructor and Description |
|---|
Client()
Creates a new client
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(int port)
Connects to a server on a given port and verified that the server
sends appropriate data.
|
protected int |
getHeaderInt()
Returns the header
int that is written by the client
when it first connects. |
protected void |
processData(int data)
Processes a piece of data that was read from the server
|
public void connect(int port)
throws IOException
IOException - If something goes wrong while connecting or communicating
with the server.protected int getHeaderInt()
int that is written by the client
when it first connects. This allows the server to distinguish
between a regular client and a "shutdown" client.protected void processData(int data)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.