public class UnicastTestTcp
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
protected class |
UnicastTestTcp.Acceptor |
限定符和类型 | 字段和说明 |
---|---|
protected UnicastTestTcp.Acceptor |
acceptor |
protected java.util.concurrent.atomic.AtomicLong |
current_value |
protected static byte |
DATA |
protected PhysicalAddress |
destination |
protected boolean |
dont_bundle |
protected java.net.InetSocketAddress |
local |
protected int |
msg_size |
protected long |
msgs_per_sec |
protected int |
num_msgs |
protected int |
num_threads |
protected boolean |
oob |
protected java.io.DataOutputStream |
output |
protected java.util.concurrent.locks.Lock |
output_lock |
protected long |
print |
protected java.net.InetSocketAddress |
remote |
protected java.net.Socket |
sock |
protected static int |
SOCK_RECV_BUF_SIZE |
protected static int |
SOCK_SEND_BUF_SIZE |
protected java.net.ServerSocket |
srv_sock |
protected long |
start |
protected static byte |
START |
protected long |
stop |
protected static boolean |
TCP_NODELAY |
protected java.util.concurrent.atomic.AtomicLong |
total_bytes |
protected long |
total_time |
构造器和说明 |
---|
UnicastTestTcp() |
限定符和类型 | 方法和说明 |
---|---|
void |
eventLoop() |
void |
init(java.lang.String local_addr,
java.lang.String remote_addr,
int local_port,
int remote_port) |
static void |
main(java.lang.String[] args) |
protected static Message |
readMessage(java.io.DataInput in) |
void |
receive(Message msg) |
protected static void |
writeMessage(Message msg,
java.io.DataOutputStream out) |
protected boolean oob
protected boolean dont_bundle
protected int num_threads
protected int num_msgs
protected int msg_size
protected java.net.InetSocketAddress local
protected java.net.InetSocketAddress remote
protected PhysicalAddress destination
protected java.net.Socket sock
protected java.io.DataOutputStream output
protected final java.util.concurrent.locks.Lock output_lock
protected java.net.ServerSocket srv_sock
protected UnicastTestTcp.Acceptor acceptor
protected long start
protected long stop
protected long total_time
protected long msgs_per_sec
protected long print
protected java.util.concurrent.atomic.AtomicLong current_value
protected java.util.concurrent.atomic.AtomicLong total_bytes
protected static final boolean TCP_NODELAY
protected static final int SOCK_SEND_BUF_SIZE
protected static final int SOCK_RECV_BUF_SIZE
protected static final byte START
protected static final byte DATA
public void init(java.lang.String local_addr, java.lang.String remote_addr, int local_port, int remote_port) throws java.lang.Exception
java.lang.Exception
public void eventLoop() throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args)
public void receive(Message msg)
protected static final void writeMessage(Message msg, java.io.DataOutputStream out) throws java.lang.Exception
java.lang.Exception
protected static final Message readMessage(java.io.DataInput in) throws java.lang.Exception
java.lang.Exception