Search in sources :

Example 1 with ResponsePacket

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;
}
Also used : ResponsePacket(com.navercorp.pinpoint.rpc.packet.ResponsePacket) ControlHandshakeResponsePacket(com.navercorp.pinpoint.rpc.packet.ControlHandshakeResponsePacket) ChannelBuffer(org.jboss.netty.buffer.ChannelBuffer)

Example 2 with ResponsePacket

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);
}
Also used : ResponsePacket(com.navercorp.pinpoint.rpc.packet.ResponsePacket) ControlHandshakeResponsePacket(com.navercorp.pinpoint.rpc.packet.ControlHandshakeResponsePacket)

Aggregations

ControlHandshakeResponsePacket (com.navercorp.pinpoint.rpc.packet.ControlHandshakeResponsePacket)2 ResponsePacket (com.navercorp.pinpoint.rpc.packet.ResponsePacket)2 ChannelBuffer (org.jboss.netty.buffer.ChannelBuffer)1