Class MindustryClajProxy
java.lang.Object
arc.net.Connection
arc.net.Client
com.xpdustry.claj.api.net.ProxyClient
com.xpdustry.claj.api.ClajProxy
com.xpdustry.claj.client.MindustryClajProxy
- All Implemented Interfaces:
arc.net.EndPoint, Runnable
public class MindustryClajProxy
extends com.xpdustry.claj.api.ClajProxy
-
Field Summary
Fields inherited from class com.xpdustry.claj.api.ClajProxy
allowStateRequests, CON_BROADCAST, isProtected, isPublic, link, provider, quietErrors, roomClosed, roomCreated, roomId, roomPassword, UNCREATED_ROOMFields inherited from class com.xpdustry.claj.api.net.ProxyClient
broadcastSupported, closing, conListener, connectHost, connecting, connections, connectionsMap, connectTcpPort, connectTimeout, connectUdpPort, defaultTimeout, errorHandler, forceTcp, lastPing, pingTime, receiver, shutdown, starting, writeBufferThreshold -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseAllConnections(arc.net.DcReason reason) com.xpdustry.claj.api.net.VirtualConnectiongetConnection(mindustry.net.NetConnection con) We cannot easily convert to VirtualConnection as ArcConnection is package-private.Iterable<mindustry.net.NetConnection> intmindustry.net.HostgetState()static booleanisMindustryConnection(arc.net.Connection con) voidkickAllConnections(mindustry.net.Packets.KickReason reason) static mindustry.net.NetConnectiontoMindustryConnection(arc.net.Connection con) static com.xpdustry.claj.api.net.VirtualConnectiontoVirtualConnection(mindustry.net.NetConnection con) Really difficult to convert as ArcConnection is package-private.Methods inherited from class com.xpdustry.claj.api.ClajProxy
closeRoom, closeRoom, conConnected, conDisconnected, conIdle, connect, conReceived, link, makeBroadcastClosePacket, makeBroadcastWrapPacket, makeConClosePacket, makeConWrapPacket, makeRoomClosePacket, makeRoomConfigPacket, makeRoomCreatePacket, makeRoomStatePacket, notifyConfiguration, notifyRoomState, postTask, postTask, postTask, requestRoomId, roomCreated, roomId, runRoomClose, runRoomCreated, setDefaultConfigurationMethods inherited from class com.xpdustry.claj.api.net.ProxyClient
addConnection, broadcast, broadcastImpl, clearConnections, close, close, close, closeQuietly, connect, connect, eachConnections, getConnection, getConnections, getInternalConnections, isConnecting, isRunning, removeConnection, run, send, send, send, sendTCP, start, stop, update, updateIdle, updatePingMethods inherited from class arc.net.Client
close, connect, connect, connect, discoverHosts, dispose, getSerialization, getUpdateThread, handleNetException, reconnect, reconnect, setDiscoveryPacket, setKeepAliveUDPMethods inherited from class arc.net.Connection
addListener, getArbitraryData, getEndPoint, getID, getLastProtocolError, getRemoteAddressTCP, getRemoteAddressUDP, getReturnTripTime, getTcpWriteBufferSize, isConnected, isIdle, removeListener, sendUDP, setArbitraryData, setIdleThreshold, setKeepAliveTCP, setName, setTimeout, toString, updateReturnTripTimeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface arc.net.EndPoint
addListener, removeListener
-
Constructor Details
-
MindustryClajProxy
public MindustryClajProxy(com.xpdustry.claj.api.ClajProvider provider)
-
-
Method Details
-
isMindustryConnection
public static boolean isMindustryConnection(arc.net.Connection con) -
toMindustryConnection
public static mindustry.net.NetConnection toMindustryConnection(arc.net.Connection con) -
toVirtualConnection
public static com.xpdustry.claj.api.net.VirtualConnection toVirtualConnection(mindustry.net.NetConnection con) Really difficult to convert as ArcConnection is package-private. Reflection is used. -
getMindustryConnections
-
getMindustryConnectionsSize
public int getMindustryConnectionsSize() -
getConnection
public com.xpdustry.claj.api.net.VirtualConnection getConnection(mindustry.net.NetConnection con) We cannot easily convert to VirtualConnection as ArcConnection is package-private. So we'll need to use the reverse path -
kickAllConnections
public void kickAllConnections(mindustry.net.Packets.KickReason reason) -
closeAllConnections
public void closeAllConnections(arc.net.DcReason reason) - Overrides:
closeAllConnectionsin classcom.xpdustry.claj.api.net.ProxyClient
-
getState
public mindustry.net.Host getState()
-