SocketChannel socketChannel =
SocketChannel.open(new InetSocketAddress(block.getLocations().get(0).mHost, block
.getLocations().get(0).mSecondaryPort));
try {
while (!sendMsg.finishSending()) {
sendMsg.send(socketChannel);
}
DataServerMessage recvMsg =
DataServerMessage.createBlockResponseMessage(false, block.blockId, offset, length);
while (!recvMsg.isMessageReady()) {
int numRead = recvMsg.recv(socketChannel);