Errai 3.0.1-SNAPSHOT

org.jboss.websockets.oio.internal.protocol.ietf07
Class Hybi07Socket

java.lang.Object
  extended by org.jboss.websockets.oio.internal.AbstractWebSocket
      extended by org.jboss.websockets.oio.internal.protocol.ietf07.Hybi07Socket
All Implemented Interfaces:
OioWebSocket

public class Hybi07Socket
extends AbstractWebSocket

Implementation of the Hybi-07 Websocket Framing Protocol.

Author:
Mike Brock

Field Summary
 
Fields inherited from class org.jboss.websockets.oio.internal.AbstractWebSocket
closingStrategy, inputStream, outputStream, webSocketId
 
Constructor Summary
Hybi07Socket(InputStream inputStream, OutputStream outputStream, ClosingStrategy closingStrategy)
           
 
Method Summary
 byte[] _readBinaryFrame()
           
static OioWebSocket from(HttpRequestBridge request, HttpResponseBridge response, ClosingStrategy closingStrategy)
           
 Frame readFrame()
          Read a single frame from the socket.
 void writeFrame(Frame frame)
          Write a frame to the socket.
 
Methods inherited from class org.jboss.websockets.oio.internal.AbstractWebSocket
closeSocket, getSocketID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hybi07Socket

public Hybi07Socket(InputStream inputStream,
                    OutputStream outputStream,
                    ClosingStrategy closingStrategy)
Method Detail

from

public static OioWebSocket from(HttpRequestBridge request,
                                HttpResponseBridge response,
                                ClosingStrategy closingStrategy)
                         throws IOException
Throws:
IOException

_readBinaryFrame

public byte[] _readBinaryFrame()
                        throws IOException
Throws:
IOException

readFrame

public Frame readFrame()
                throws IOException
Description copied from interface: OioWebSocket
Read a single frame from the socket.

Returns:
an instance of the received Frame
Throws:
IOException

writeFrame

public void writeFrame(Frame frame)
                throws IOException
Description copied from interface: OioWebSocket
Write a frame to the socket.

Parameters:
frame - the @{link Frame} instance to write to the socket.
Throws:
IOException

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.