Errai 3.0.1-SNAPSHOT

org.jboss.websockets.oio
Interface OioWebSocket

All Known Subinterfaces:
WebSocket
All Known Implementing Classes:
AbstractWebSocket, Hybi00Socket, Hybi07Socket, Hybi13Socket

public interface OioWebSocket

A WebSocket that blocks when you readFrame or writeFrame. Underneath, based on java.io.* a.k.a. Old IO (Oio).

Version:
$Revision: 1 $
Author:
Mike Brock

Method Summary
 void closeSocket()
          Terminates the connection with the client and closes the socket.
 String getSocketID()
          A unique ID associated with the socket, which can be used for session association.
 Frame readFrame()
          Read a single frame from the socket.
 void writeFrame(Frame frame)
          Write a frame to the socket.
 

Method Detail

getSocketID

String getSocketID()
A unique ID associated with the socket, which can be used for session association. This ID is generated by the WebSockets framework as a random hash when the socket is open and has no association with any external API or the websocket handshake process.

Returns:
A hex string representing the unique ID of the socket.

readFrame

Frame readFrame()
                throws IOException
Read a single frame from the socket.

Returns:
an instance of the received Frame
Throws:
IOException

writeFrame

void writeFrame(Frame frame)
                throws IOException
Write a frame to the socket.

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

closeSocket

void closeSocket()
                 throws IOException
Terminates the connection with the client and closes the socket.

Throws:
IOException

Errai 3.0.1-SNAPSHOT

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