sound.chat
Class TCPNetwork

java.lang.Object
  extended by sound.chat.BaseNetwork
      extended by sound.chat.TCPNetwork
All Implemented Interfaces:
Network

public class TCPNetwork
extends BaseNetwork


Constructor Summary
TCPNetwork(ChatModel chatModel)
           
 
Method Summary
 void connect(java.net.InetAddress addr)
           
 java.io.InputStream createReceiveStream()
           
 java.io.OutputStream createSendStream()
           
 void disconnect()
           
 java.net.InetAddress getPeer()
           
 boolean isConnected()
           
 boolean listen()
           
 void setListen(boolean bListen)
          Enables listening.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPNetwork

public TCPNetwork(ChatModel chatModel)
Method Detail

connect

public void connect(java.net.InetAddress addr)

getPeer

public java.net.InetAddress getPeer()

disconnect

public void disconnect()

isConnected

public boolean isConnected()

setListen

public void setListen(boolean bListen)
Enables listening. This method has to be called with true before calling listen(). If listen() will no longer be used, setListen() should be called again with false to free system resources.


listen

public boolean listen()

createReceiveStream

public java.io.InputStream createReceiveStream()
                                        throws java.io.IOException
Throws:
java.io.IOException

createSendStream

public java.io.OutputStream createSendStream()
                                      throws java.io.IOException
Throws:
java.io.IOException