use of com.navercorp.pinpoint.rpc.packet.ResponsePacket in project pinpoint by naver.
the class ControlPacketServerTest method readSimpleResponsePacket.
private ResponsePacket readSimpleResponsePacket(InputStream inputStream) throws ProtocolException, IOException {
byte[] payload = readData(inputStream);
ChannelBuffer cb = ChannelBuffers.wrappedBuffer(payload);
short packetType = cb.readShort();
ResponsePacket packet = ResponsePacket.readBuffer(packetType, cb);
return packet;
}
use of com.navercorp.pinpoint.rpc.packet.ResponsePacket in project pinpoint by naver.
the class ControlPacketServerTest method sendAndReceiveSimplePacket.
private void sendAndReceiveSimplePacket(Socket socket) throws ProtocolException, IOException {
sendSimpleRequestPacket(socket.getOutputStream());
ResponsePacket responsePacket = readSimpleResponsePacket(socket.getInputStream());
Assert.assertNotNull(responsePacket);
}
Aggregations