net.sourceforge.yagurashogi.client.network
Class ServerConnection

java.lang.Object
  extended by net.sourceforge.yagurashogi.client.network.ServerConnection

public class ServerConnection
extends java.lang.Object

Object connecting with server and creating input and output streams


Field Summary
static boolean connected
           
static java.io.BufferedReader in
           
static java.io.PrintWriter out
           
static java.net.Socket socket
           
 
Constructor Summary
ServerConnection()
           
 
Method Summary
static void disconnect()
          Close connection with server
static void tryToConnect(java.lang.String host, int port)
          Connects to server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connected

public static boolean connected

socket

public static java.net.Socket socket

out

public static java.io.PrintWriter out

in

public static java.io.BufferedReader in
Constructor Detail

ServerConnection

public ServerConnection()
Method Detail

tryToConnect

public static void tryToConnect(java.lang.String host,
                                int port)
                         throws java.lang.Exception
Connects to server

Parameters:
host - host address of server
port - port of connection
Throws:
java.lang.Exception

disconnect

public static void disconnect()
Close connection with server