final class UDPNetwork.DatagramOutputStream extends MessageOutputStream
Modifier and Type | Field and Description |
---|---|
private byte[] |
ackBuf |
private int |
datagramStamp |
private byte[] |
handshakeBuf |
private SocketAddress |
serverAddr |
private UDPNetwork.ServerInfo |
serverInfo |
private int |
size |
buf, compressedFlows, count, logmon, oos
Constructor and Description |
---|
UDPNetwork.DatagramOutputStream() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
handShake(SocketAddress addr) |
private void |
sendPacket() |
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the specified byte array starting
at offset off to this output stream. |
void |
write(int b)
Writes the specified byte to this output stream.
|
(package private) void |
writeAck(int ackNumber,
SocketAddress addr) |
protected void |
writeHeader()
Writes the protocol header to this output stream.
|
(package private) void |
writeMessage(SocketAddress addr,
Message msg,
long currentTimeMillis) |
(package private) void |
writeMessage(UDPNetwork.ServerInfo serverInfo,
SocketAddress addr,
int startIndex,
Message msg,
long currentTimeMillis) |
getLogger, write, writeInt, writeMessage, writeMessageHeader, writeShort
close, flush
private int datagramStamp
private int size
private SocketAddress serverAddr
private UDPNetwork.ServerInfo serverInfo
private byte[] ackBuf
private byte[] handshakeBuf
UDPNetwork.DatagramOutputStream() throws IOException
IOException
void writeMessage(SocketAddress addr, Message msg, long currentTimeMillis) throws IOException
IOException
void writeAck(int ackNumber, SocketAddress addr) throws IOException
IOException
public void write(int b) throws IOException
MessageOutputStream
write
in class MessageOutputStream
b
- the byte to be written.IOException
- if an I/O error occurs.private void sendPacket() throws IOException
IOException
void writeMessage(UDPNetwork.ServerInfo serverInfo, SocketAddress addr, int startIndex, Message msg, long currentTimeMillis) throws IOException
IOException
void handShake(SocketAddress addr) throws IOException
IOException
public void write(byte[] b, int off, int len) throws IOException
MessageOutputStream
len
bytes from the specified byte array starting
at offset off
to this output stream.write
in class MessageOutputStream
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.IOException
- if an I/O error occurs.protected void writeHeader()
MessageOutputStream
writeHeader
in class MessageOutputStream
Copyright © 2015 ScalAgent D.T.. All Rights Reserved.