private void initSender() { aa(this, sockType == SocketType.SENDER, ""); sendWindow = 3 * Transport.MAX_PAYLOAD_SIZE; sendBase = 0; seqNum = 0; sendbb = ByteBuffer.allocate(SEND_BUFFER_SIZE); }
private void initReceiver() { aa(this, sockType == SocketType.RECEIVER, ""); recvBase = 0; recvbb = ByteBuffer.allocate(RECV_BUFFER_SIZE); transportBuffer = new HashMap<Integer, Transport>(); }