|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbamboo.lss.TputTest
public class TputTest
A throughput test for UdpCC.
| Field Summary | |
|---|---|
static ASyncCore |
acore
|
static TputTest |
cbs
|
static int |
cnt
|
static int |
msg_size
|
static InetSocketAddress |
peer
|
static long |
start_time_ms
|
static ASyncCore.TimerCB |
stop_cb
|
static UdpCC |
udpcc
|
| Constructor Summary | |
|---|---|
TputTest()
|
|
| Method Summary | |
|---|---|
void |
cb(Object user_data,
boolean success)
The callback indicating the UdpCC layer is done with a particular message. |
Object |
deserialize(ByteBuffer buf)
Called to deserialize the given buf into the message
it represents; the inverse of serialize. |
static void |
main(String[] args)
|
void |
recv(Object msg,
InetSocketAddress src,
InetSocketAddress local,
int tries,
long wait_ms,
long est_rtt_ms)
Called when a message is received. |
static void |
send_new_msg()
|
int |
serialize_size(Object msg)
Called to determine the size of the byte array needed to serialize the given msg into. |
void |
serialize(Object msg,
ByteBuffer buf)
Called to serialize the given msg into the provided
buf; the inverse of deserialize. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ASyncCore.TimerCB stop_cb
public static UdpCC udpcc
public static ASyncCore acore
public static InetSocketAddress peer
public static TputTest cbs
public static int msg_size
public static int cnt
public static long start_time_ms
| Constructor Detail |
|---|
public TputTest()
| Method Detail |
|---|
public int serialize_size(Object msg)
UdpCC.Serializermsg into.
serialize_size in interface UdpCC.Serializer
public void serialize(Object msg,
ByteBuffer buf)
UdpCC.Serializermsg into the provided
buf; the inverse of deserialize.
serialize in interface UdpCC.Serializer
public Object deserialize(ByteBuffer buf)
throws Exception
UdpCC.Serializerbuf into the message
it represents; the inverse of serialize.
deserialize in interface UdpCC.SerializerException
public void recv(Object msg,
InetSocketAddress src,
InetSocketAddress local,
int tries,
long wait_ms,
long est_rtt_ms)
UdpCC.Sink
recv in interface UdpCC.Sinkmsg - the message that was receivedsrc - the host and port from which the message was
sent. The source is not authenticated; this
value is just what is read out of the IP packet
headerlocal - the localhost and port on which the message was
receivedtries - the number of times the message has been sent,
including this one, or -1 if that information is
not available (for example, if the message was
sent with UdpCC.send_nocc(java.lang.Object, java.net.InetSocketAddress))wait_ms - the time in milliseconds that the message sat in
the sender's outbound queue before being sent,
presumably because it was waiting behind other
messages, or -1 if that information is not
availableest_rtt_ms - the sender's estimate of the round trip time in
milliseconds between it and this host, or -1 if
that information is not available
public void cb(Object user_data,
boolean success)
UdpCC.SendCB
cb in interface UdpCC.SendCBuser_data - the data supplied to sendsuccess - whether the message was acknowledged by the
recipientpublic static void send_new_msg()
public static void main(String[] args)
throws Exception
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||