All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.server.MyServer

java.lang.Object
   |
   +----pinball.server.Network
           |
           +----pinball.server.MyServer

public class MyServer
extends Network
The server part of the network.


Variable Index

 o goingOnline
Going to go online.

Constructor Index

 o MyServer()
Set up the sockets for the server.
 o MyServer(BufferedReader, PrintWriter)
Setup the client with pre-exisiting streams.
 o MyServer(int)
Set up the sockets for the server.
 o MyServer(int, int)
Set up the sockets for the server.
 o MyServer(int, int, boolean)
Set up the sockets for the server.

Method Index

 o connection()
Wait for a connection
 o dataSocket()
Get the data socket.
 o getPort()
Get the port for the server.
 o goingOnline()
Get the going online status.
 o goingOnline(boolean)
Set the going online status.
 o isOnline()
Is the server online.
 o offline()
Set server offline.
 o serverSocket()
Get the server socket.
 o time()
Send the time.

Variables

 o goingOnline
 protected boolean goingOnline
Going to go online.

Constructors

 o MyServer
 public MyServer()
Set up the sockets for the server.

 o MyServer
 public MyServer(int port)
Set up the sockets for the server.

Parameters:
port - the port to connect on.
 o MyServer
 public MyServer(int port,
                 int timeout)
Set up the sockets for the server.

Parameters:
port - the port to connect on.
timeout - the timeout for the port.
 o MyServer
 public MyServer(int port,
                 int timeout,
                 boolean connect)
Set up the sockets for the server.

Parameters:
port - the port to connect on.
timeout - the timeout for the port.
connect - should the server wait for a connection now.
 o MyServer
 public MyServer(BufferedReader in,
                 PrintWriter out)
Setup the client with pre-exisiting streams.

Methods

 o connection
 public void connection()
Wait for a connection

 o offline
 public void offline()
Set server offline.

 o isOnline
 public boolean isOnline()
Is the server online.

Returns:
Online status.
 o goingOnline
 public boolean goingOnline()
Get the going online status.

Returns:
going online status.
 o goingOnline
 public void goingOnline(boolean online)
Set the going online status.

Parameters:
online - set the online status.
 o serverSocket
 public ServerSocket serverSocket()
Get the server socket.

Returns:
the server socket.
 o dataSocket
 public Socket dataSocket()
Get the data socket.

Returns:
the data socket.
 o getPort
 public int getPort()
Get the port for the server.

Returns:
the port of the server.
 o time
 public void time()
Send the time.


All Packages  Class Hierarchy  This Package  Previous  Next  Index