Examples of sendHeader()


Examples of com.rabbitmq.client.impl.SocketFrameHandler.sendHeader()

*/
public class ConnectionOpen extends TestCase {
    public void testCorrectProtocolHeader() throws IOException {
        ConnectionFactory factory = new ConnectionFactory();
        SocketFrameHandler fh = new SocketFrameHandler(factory.getSocketFactory().createSocket("localhost", AMQP.PROTOCOL.PORT));
        fh.sendHeader();
        AMQCommand command = new AMQCommand();
        while (!command.handleFrame(fh.readFrame())) { }
        Method m = command.getMethod();
        //    System.out.println(m.getClass());
        assertTrue("First command must be Connection.start",
View Full Code Here

Examples of com.rabbitmq.client.impl.SocketFrameHandler.sendHeader()

    public void testCrazyProtocolHeader() throws IOException {
        ConnectionFactory factory = new ConnectionFactory();
        // keep the frame handler's socket
        Socket fhSocket = factory.getSocketFactory().createSocket("localhost", AMQP.PROTOCOL.PORT);
        SocketFrameHandler fh = new SocketFrameHandler(fhSocket);
        fh.sendHeader(100, 3); // major, minor
        DataInputStream in = fh.getInputStream();
        // we should get a valid protocol header back
        byte[] header = new byte[4];
        in.read(header);
        // The protocol header is "AMQP" plus a version that the server
View Full Code Here

Examples of com.rabbitmq.client.impl.SocketFrameHandler.sendHeader()

*/
public class ConnectionOpen extends TestCase {
    public void testCorrectProtocolHeader() throws IOException {
        ConnectionFactory factory = new ConnectionFactory();
        SocketFrameHandler fh = new SocketFrameHandler(factory.getSocketFactory().createSocket("localhost", AMQP.PROTOCOL.PORT));
        fh.sendHeader();
        AMQCommand command = new AMQCommand();
        while (!command.handleFrame(fh.readFrame())) { }
        Method m = command.getMethod();
        //    System.out.println(m.getClass());
        assertTrue("First command must be Connection.start",
View Full Code Here

Examples of com.rabbitmq.client.impl.SocketFrameHandler.sendHeader()

    public void testCrazyProtocolHeader() throws IOException {
        ConnectionFactory factory = new ConnectionFactory();
        // keep the frame handler's socket
        Socket fhSocket = factory.getSocketFactory().createSocket("localhost", AMQP.PROTOCOL.PORT);
        SocketFrameHandler fh = new SocketFrameHandler(fhSocket);
        fh.sendHeader(100, 3); // major, minor
        DataInputStream in = fh.getInputStream();
        // we should get a valid protocol header back
        byte[] header = new byte[4];
        in.read(header);
        // The protocol header is "AMQP" plus a version that the server
View Full Code Here

Examples of com.sun.grizzly.http.SocketChannelOutputBuffer.sendHeader()

        headers.setValue(LoadBalancerProxyConstants.CONTENT_TYPE_HEADER)
                .setString("text/html");
        outputBuffer.sendStatus();
        int size = headers.size();
        for (int i = 0; i < size; i++) {
            outputBuffer.sendHeader(headers.getName(i), headers.getValue(i));
        }
        outputBuffer.endHeaders();
        try {
            /**Browsers are not happy with the status alone, need to send
             * some html message so that it can be displayed to user.
View Full Code Here

Examples of com.sun.grizzly.http.SocketChannelOutputBuffer.sendHeader()

        outputBuffer.sendStatus();

        int size = headers.size();

        for (int i = 0; i < size; i++) {
            outputBuffer.sendHeader(headers.getName(i), headers.getValue(i));
        }
        outputBuffer.endHeaders();
        try {
            outputBuffer.endRequest();
            outputBuffer.flush();
View Full Code Here

Examples of nginx.clojure.NginxHttpServerChannel.sendHeader()

        @Override
        public void onConnect(long status, NginxHttpServerChannel data) {
        }
      });
      Init.serverSentEventSubscribers.add(channel);
      channel.sendHeader(200, ArrayMap.create("Content-Type", "text/event-stream").entrySet(), true, false);
      channel.send("retry: 4500\r\n", true, false);
      return null;
    }
  }
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.