Class StreamSender
java.lang.Object
arc.net.TcpIdleSender
arc.net.InputStreamSender
com.xpdustry.claj.common.net.stream.StreamSender
- All Implemented Interfaces:
arc.net.NetListener
public class StreamSender
extends arc.net.InputStreamSender
invalid reference
mindustry.net.ArcNetProvider.ArcConnection#sendStream(mindustry.net.Streamable)
Note: StreamHead and StreamChunk must be registered in ClajNet.
-
Nested Class Summary
Nested classes/interfaces inherited from interface arc.net.NetListener
arc.net.NetListener.LagListener, arc.net.NetListener.QueuedListener, arc.net.NetListener.ThreadedListener -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intfinal booleanfinal arc.net.Connectionprotected intfinal InputStreamfinal intfinal byteprotected int -
Constructor Summary
ConstructorsConstructorDescriptionStreamSender(arc.net.Connection connection, InputStream stream, byte type, int length, int chunkSize, boolean isCompressed) Stream is directly started. -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectnext(byte[] bytes) static PreparedStreamstatic PreparedStreamstatic PreparedStreamstatic StreamSenderstatic StreamSenderstatic StreamSenderprotected voidstart()Methods inherited from class arc.net.InputStreamSender
nextMethods inherited from class arc.net.TcpIdleSender
idleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface arc.net.NetListener
connected, disconnected, received
-
Field Details
-
connection
public final arc.net.Connection connection -
input
-
type
public final byte type -
length
public final int length -
chunkSize
public final int chunkSize -
compressed
public final boolean compressed -
id
protected int id -
written
protected int written
-
-
Constructor Details
-
StreamSender
public StreamSender(arc.net.Connection connection, InputStream stream, byte type, int length, int chunkSize, boolean isCompressed) Stream is directly started.
-
-
Method Details
-
start
protected void start()- Overrides:
startin classarc.net.TcpIdleSender
-
next
- Specified by:
nextin classarc.net.InputStreamSender
-
send
-
send
-
send
public static StreamSender send(arc.net.Connection connection, Packet packet, int chunkSize, boolean compress) -
prepare
-
prepare
-
prepare
-