|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectcom.JRcServer.commons.net.UdpProtocol
public class UdpProtocol
UDPプロトコルオブジェクト.
UDPプロトコルで処理するオブジェクトです.
| フィールドの概要 |
|---|
| インタフェース com.JRcServer.commons.net.BaseUdpProtocol から継承されたフィールド |
|---|
ALL_MODE, BUF_LENGTH, NOT_MODE, RCV_MODE, SND_MODE |
| コンストラクタの概要 | |
|---|---|
UdpProtocol()
コンストラクタ. |
|
| メソッドの概要 | |
|---|---|
void |
close()
クローズ処理. |
int |
getBuffer()
設定バッファ長を取得. |
ConnectAddress |
getLocal()
ローカルアドレスを取得. |
void |
getLocal(ConnectAddress addr)
ローカルアドレスを取得. |
java.net.InetAddress |
getLocalAddress()
ローカルアドレス情報を取得. |
int |
getLocalPort()
ローカルポート番号を取得. |
boolean |
isOpen()
オープンチェック. |
void |
open(int bufLen)
オープン処理. |
void |
open(int bufLen,
int port)
オープン処理. |
void |
open(int bufLen,
int port,
java.net.InetAddress addr)
オープン処理. |
void |
openTo(int bufMode,
int bufLen)
オープン処理. |
void |
openTo(int bufMode,
int bufLen,
int port)
オープン処理. |
void |
openTo(int bufMode,
int bufLen,
int port,
java.net.InetAddress addr)
オープン処理. |
int |
receive(byte[] out,
ConnectAddress addr)
データ受信. |
int |
receive(byte[] out,
ConnectAddress addr,
int timeout)
データ受信. |
byte[] |
receive(ConnectAddress addr)
データ受信. |
byte[] |
receive(ConnectAddress addr,
int timeout)
データ受信. |
void |
send(byte[] binary,
ConnectAddress addr)
データ送信. |
void |
send(byte[] binary,
java.net.InetAddress addr,
int port)
データ送信. |
| クラス java.lang.Object から継承されたメソッド |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public UdpProtocol()
| メソッドの詳細 |
|---|
public final void open(int bufLen)
throws NotBindException
BaseUdpProtocol 内の openbufLen - 送受信バッファ長を設定します.
NotBindException - バインド失敗.
public final void open(int bufLen,
int port)
throws InputException,
NotBindException
BaseUdpProtocol 内の openbufLen - 送受信バッファ長を設定します.port - オープン対象のポート番号を設定します.
InputException - 入力例外.
NotBindException - バインド失敗.
public final void open(int bufLen,
int port,
java.net.InetAddress addr)
throws InputException,
NotBindException
BaseUdpProtocol 内の openbufLen - 送受信バッファ長を設定します.port - オープン対象のポート番号を設定します.addr - オープン対象の自IPアドレスを設定します.
InputException - 入力例外.
NotBindException - バインド失敗.
public final void openTo(int bufMode,
int bufLen)
throws NotBindException
BaseUdpProtocol 内の openTobufMode - バッファモードを設定します.bufLen - 送受信バッファ長を設定します.
NotBindException - バインド失敗.
public final void openTo(int bufMode,
int bufLen,
int port)
throws InputException,
NotBindException
BaseUdpProtocol 内の openTobufMode - バッファモードを設定します.bufLen - 送受信バッファ長を設定します.port - オープン対象のポート番号を設定します.
InputException - 入力例外.
NotBindException - バインド失敗.
public final void openTo(int bufMode,
int bufLen,
int port,
java.net.InetAddress addr)
throws InputException,
NotBindException
BaseUdpProtocol 内の openTobufMode - バッファモードを設定します.bufLen - 送受信バッファ長を設定します.port - オープン対象のポート番号を設定します.addr - オープン対象の自IPアドレスを設定します.
InputException - 入力例外.
NotBindException - バインド失敗.public final void close()
BaseUdpProtocol 内の close
public final void send(byte[] binary,
ConnectAddress addr)
throws InputException,
UndefineBindException
BaseUdpProtocol 内の sendbinary - 送信対象のデータを設定します.addr - 送信対象のIPアドレス/ポート番号を指定します.
InputException - 入力例外.
UndefineBindException - 未バインド例外.
public final void send(byte[] binary,
java.net.InetAddress addr,
int port)
throws InputException,
UndefineBindException
BaseUdpProtocol 内の sendbinary - 送信対象のデータを設定します.addr - 送信対象のIPアドレスを指定します.port - 送信対象のポート番号を設定します.
InputException - 入力例外.
UndefineBindException - 未バインド例外.
public final byte[] receive(ConnectAddress addr)
throws UndefineBindException,
ConnectTimeoutException
BaseUdpProtocol 内の receiveaddr - 受信先のIPアドレスとポート番号が格納された
内容が返されます.
UndefineBindException - バインド未定義例外.
ConnectTimeoutException - タイムアウト例外.
public final byte[] receive(ConnectAddress addr,
int timeout)
throws UndefineBindException,
ConnectTimeoutException
BaseUdpProtocol 内の receiveaddr - 受信先のIPアドレスとポート番号が格納された
内容が返されます.timeout - 受信タイムアウト値を設定します.
UndefineBindException - バインド未定義例外.
ConnectTimeoutException - タイムアウト例外.
public final int receive(byte[] out,
ConnectAddress addr)
throws InputException,
UndefineBindException,
ConnectTimeoutException
BaseUdpProtocol 内の receiveout - 受信されたバイナリ情報が設定されます.addr - 受信先のIPアドレスとポート番号が格納された
内容が返されます.
InputException - 入力例外
UndefineBindException - バインド未定義例外.
ConnectTimeoutException - タイムアウト例外.
public final int receive(byte[] out,
ConnectAddress addr,
int timeout)
throws InputException,
UndefineBindException,
ConnectTimeoutException
BaseUdpProtocol 内の receiveout - 受信されたバイナリ情報が設定されます.addr - 受信先のIPアドレスとポート番号が格納された
内容が返されます.timeout - 受信タイムアウト値を設定します.
InputException - 入力例外
UndefineBindException - バインド未定義例外.
ConnectTimeoutException - タイムアウト例外.public final void getLocal(ConnectAddress addr)
BaseUdpProtocol 内の getLocaladdr - 対象のローカルアドレスが返されます.public final ConnectAddress getLocal()
BaseUdpProtocol 内の getLocalpublic final java.net.InetAddress getLocalAddress()
BaseUdpProtocol 内の getLocalAddresspublic final int getLocalPort()
BaseUdpProtocol 内の getLocalPortpublic final int getBuffer()
BaseUdpProtocol 内の getBufferpublic final boolean isOpen()
BaseUdpProtocol 内の isOpen
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||