sound.chat
Class TCPNetwork
java.lang.Object
sound.chat.BaseNetwork
sound.chat.TCPNetwork
- All Implemented Interfaces:
- Network
public class TCPNetwork
- extends BaseNetwork
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPNetwork
public TCPNetwork(ChatModel chatModel)
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