vooga.engine.networking.client
Class ChatConnection

java.lang.Object
  extended by java.lang.Thread
      extended by vooga.engine.networking.GameSocket
          extended by vooga.engine.networking.client.ChatConnection
All Implemented Interfaces:
java.lang.Runnable

public class ChatConnection
extends GameSocket

Class for connecting the client to the server chat socket.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class vooga.engine.networking.GameSocket
outStream
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ChatConnection()
          Calls GameSocket's constructor with the server's IP address and the port that holds the chat.
 
Method Summary
 java.lang.String getChat()
          Returns the latest chat from the socket.
 void sendChat(java.lang.String chat)
          Sends the chat over the network.
 
Methods inherited from class vooga.engine.networking.GameSocket
closeConnections, finalize, isConnected, receive, run, send
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChatConnection

public ChatConnection()
               throws java.net.UnknownHostException,
                      java.io.IOException
Calls GameSocket's constructor with the server's IP address and the port that holds the chat.

Throws:
java.net.UnknownHostException
java.io.IOException
Method Detail

getChat

public java.lang.String getChat()
Returns the latest chat from the socket.


sendChat

public void sendChat(java.lang.String chat)
Sends the chat over the network.