Class DataStreamConnection

java.lang.Object
megamek.common.net.connections.AbstractConnection
megamek.common.net.connections.DataStreamConnection

public class DataStreamConnection extends AbstractConnection
Implementation of the AbstractConnection that uses the DataInputStream and DataOutputStream to send/receive data.
  • Field Details

    • zipped

      protected boolean zipped
      store data for packet reception statemachine
    • encoding

      protected int encoding
    • len

      protected int len
    • state

      protected PacketReadState state
  • Constructor Details

    • DataStreamConnection

      public DataStreamConnection(Socket socket, int id)
      Creates new server connection.
      Parameters:
      socket - The network socket to use
      id - The connection ID
    • DataStreamConnection

      public DataStreamConnection(String host, int port, int id)
      Creates new Client connection.
      Parameters:
      host - The host address
      port - The network port
      id - The connection ID
  • Method Details