com.jme3.network.connection
クラス TCPConnection

java.lang.Object
  上位を拡張 com.jme3.network.connection.Connection
      上位を拡張 com.jme3.network.connection.TCPConnection
すべての実装されたインタフェース:
java.lang.Runnable
直系の既知のサブクラス:
SSLTCPConnection

public class TCPConnection
extends Connection

The TCPConnection handles all traffic regarding TCP client and server.

関連項目:
Connection

コンストラクタの概要
TCPConnection()
           
TCPConnection(java.lang.String name)
           
 
メソッドの概要
 void accept(java.nio.channels.SelectableChannel channel)
          Accept an incoming connection.
 void bind(java.net.SocketAddress address)
          Bind to an address.
 void cleanup()
          Called when the connection implementation should clean up.
 void connect(java.nio.channels.SelectableChannel channel)
          Finish the connection.
 void connect(java.net.SocketAddress address)
          Connect to a server using this overload.
 void read(java.nio.channels.SelectableChannel channel)
          Read from the channel.
 void sendObject(Client con, java.lang.Object object)
          Send an object to the connector.
 void sendObject(java.lang.Object object)
          Send an object to the server.
 void write(java.nio.channels.SelectableChannel channel)
          Write to a channel.
 
クラス com.jme3.network.connection.Connection から継承されたメソッド
addConnectionListener, addConnectorFilter, addMessageListener, addMessageListener, addToDisconnectionQueue, getConnectors, getLocalConnectors, isAlive, removeConnectionListener, removeConnectorFilter, removeMessageListener, removeMessageListener, run, shouldFilterConnector
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

TCPConnection

public TCPConnection(java.lang.String name)

TCPConnection

public TCPConnection()
メソッドの詳細

connect

public void connect(java.net.SocketAddress address)
             throws java.io.IOException
クラス Connection の記述:
Connect to a server using this overload.

定義:
クラス Connection 内の connect
パラメータ:
address - The address to connect to.
例外:
java.io.IOException - When a problem occurs.

bind

public void bind(java.net.SocketAddress address)
          throws java.io.IOException
クラス Connection の記述:
Bind to an address.

定義:
クラス Connection 内の bind
パラメータ:
address - The address to bind to.
例外:
java.io.IOException - When a problem occurs.

connect

public void connect(java.nio.channels.SelectableChannel channel)
             throws java.io.IOException
クラス Connection の記述:
Finish the connection.

定義:
クラス Connection 内の connect
パラメータ:
channel - The channel.
例外:
java.io.IOException - When a problem occurs.

accept

public void accept(java.nio.channels.SelectableChannel channel)
            throws java.io.IOException
クラス Connection の記述:
Accept an incoming connection.

定義:
クラス Connection 内の accept
パラメータ:
channel - The channel.
例外:
java.io.IOException - When a problem occurs.

read

public void read(java.nio.channels.SelectableChannel channel)
          throws java.io.IOException
クラス Connection の記述:
Read from the channel.

定義:
クラス Connection 内の read
パラメータ:
channel - The channel.
例外:
java.io.IOException - When a problem occurs.

sendObject

public void sendObject(java.lang.Object object)
                throws java.io.IOException
クラス Connection の記述:
Send an object to the server. If this is a server, it will be broadcast to all clients.

定義:
クラス Connection 内の sendObject
パラメータ:
object - The object to send.
例外:
java.io.IOException - When a writing error occurs.

sendObject

public void sendObject(Client con,
                       java.lang.Object object)
                throws java.io.IOException
クラス Connection の記述:
Send an object to the connector. Server method.

定義:
クラス Connection 内の sendObject
パラメータ:
con - The connector to send to.
object - The object to send.
例外:
java.io.IOException - When a writing error occurs.

cleanup

public void cleanup()
             throws java.io.IOException
クラス Connection の記述:
Called when the connection implementation should clean up.

定義:
クラス Connection 内の cleanup
例外:
java.io.IOException - When a problem occurs.

write

public void write(java.nio.channels.SelectableChannel channel)
           throws java.io.IOException
クラス Connection の記述:
Write to a channel.

定義:
クラス Connection 内の write
パラメータ:
channel - The channel to write to.
例外:
java.io.IOException - When a problem occurs.