func (rc *readConn) readChunk(chunkMsg *Chunk) []byte {
	// Is this a chunk that was already received?
	// Drop already-received duplicates.
	if chunkMsg.seqno < rc.nread {
		return nil
	}
	if chunkMsg.seqno == rc.nread {
		rc.nread++
		if rc.nread%AckFrequency == 0 {
			rc.ackWrite(rc.nread)
		}
		if chunkMsg == nil {
			panic("eh")
		}
		return chunkMsg.chunk
	}
	// Otherwise, a future packet implies lost packets. Request a sync. Drop the future packet.
	rc.syncWrite(nil, rc.nread)
	return nil
}
// readChunk returns a non-nil chunk, if successful.
// Otherwise nil is returned to indicate that the packet was discarded.
readChunk returns a non-nil chunk, if successful.
Otherwise nil is returned to indicate that the packet was discarded.
// readChunk returns a non - nil chunk if successful . // Otherwise nil is returned to indicate that the packet was discarded .
func (rc *readConn) readChunk(chunkMsg *Chunk) []byte {
	if chunkMsg.seqno < rc.nread {
		return nil
	}
	if chunkMsg.seqno == rc.nread {
		rc.nread++
		if rc.nread%AckFrequency == 0 {
			rc.ackWrite(rc.nread)
		}
		if chunkMsg == nil {
			panic("eh")
		}
		return chunkMsg.chunk
	}
	rc.syncWrite(nil, rc.nread)
	return nil
}
func ( rc * readConn ) readChunk ( chunkMsg * Chunk ) [ ] byte { if chunkMsg . seqno < rc . nread { return nil } if chunkMsg . seqno == rc . nread { rc . nread ++ if rc . nread % AckFrequency == 0 { rc . ackWrite ( rc . nread ) } if chunkMsg == nil { panic ( " " ) } return chunkMsg . chunk } rc . syncWrite ( nil , rc . nread ) return nil }
readChunk returns a non-nil chunk, if successful.
readChunk returns a non - nil chunk if successful .
// Is this a chunk that was already received? // Drop already-received duplicates. // Otherwise, a future packet implies lost packets. Request a sync. Drop the future packet.