/** * Create an object for a new client connection. * * @param device the device this client belongs to * @param chan the connected {@link SocketChannel}. * @param pid the client pid. */ Client(Device device, SocketChannel chan, int pid) { mDevice = device; mChan = chan; mReadBuffer = ByteBuffer.allocate(INITIAL_BUF_SIZE); mWriteBuffer = ByteBuffer.allocate(WRITE_BUF_SIZE); mOutstandingReqs = new HashMap<Integer,ChunkHandler>(); mConnState = ST_INIT; mClientData = new ClientData(pid); mThreadUpdateEnabled = DdmPreferences.getInitialThreadUpdate(); mHeapUpdateEnabled = DdmPreferences.getInitialHeapUpdate(); }
/** * Create an object for a new client connection. * * @param device the device this client belongs to * @param chan the connected {@link SocketChannel}. * @param pid the client pid. */ Client(Device device, SocketChannel chan, int pid) { super(new JdwpProtocol()); mDevice = device; mChan = chan; mReadBuffer = ByteBuffer.allocate(INITIAL_BUF_SIZE); mConnState = ST_INIT; mClientData = new ClientData(pid); mThreadUpdateEnabled = DdmPreferences.getInitialThreadUpdate(); mHeapInfoUpdateEnabled = DdmPreferences.getInitialHeapUpdate(); mHeapSegmentUpdateEnabled = DdmPreferences.getInitialHeapUpdate(); }