org.eclipse.jetty.websocket
Class WebSocketConnectionD00
java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.websocket.WebSocketConnectionD00
- All Implemented Interfaces:
- Connection, Idleable, WebSocket.Outbound, WebSocketConnection
public class WebSocketConnectionD00
- extends AbstractConnection
- implements WebSocketConnection, WebSocket.Outbound
|
Method Summary |
void |
closed()
|
void |
disconnect()
|
void |
disconnect(int code,
String message)
|
static byte[] |
doTheHixieHixieShake(long key1,
long key2,
byte[] key3)
|
void |
fillBuffersFrom(Buffer buffer)
|
Connection |
handle()
|
void |
handshake(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String origin,
String subprotocol)
|
boolean |
isIdle()
|
boolean |
isOpen()
|
boolean |
isSuspended()
|
void |
sendFragment(boolean more,
byte opcode,
byte[] content,
int offset,
int length)
|
void |
sendMessage(byte opcode,
byte[] content,
int offset,
int length)
|
void |
sendMessage(byte frame,
String content)
|
void |
sendMessage(String content)
|
void |
setHixieKeys(String key1,
String key2)
|
WebSocketConnectionD00
public WebSocketConnectionD00(WebSocket websocket,
EndPoint endpoint,
int draft)
throws IOException
- Throws:
IOException
WebSocketConnectionD00
public WebSocketConnectionD00(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
int draft)
throws IOException
- Throws:
IOException
setHixieKeys
public void setHixieKeys(String key1,
String key2)
handle
public Connection handle()
throws IOException
- Specified by:
handle in interface Connection
- Throws:
IOException
isOpen
public boolean isOpen()
- Specified by:
isOpen in interface WebSocket.Outbound
isIdle
public boolean isIdle()
- Specified by:
isIdle in interface Connection
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended in interface Connection
closed
public void closed()
- Specified by:
closed in interface Connection
sendMessage
public void sendMessage(String content)
throws IOException
-
- Specified by:
sendMessage in interface WebSocket.Outbound
- Throws:
IOException
sendMessage
public void sendMessage(byte frame,
String content)
throws IOException
-
- Specified by:
sendMessage in interface WebSocket.Outbound
- Throws:
IOException
sendMessage
public void sendMessage(byte opcode,
byte[] content,
int offset,
int length)
throws IOException
-
- Specified by:
sendMessage in interface WebSocket.Outbound
- Throws:
IOException
sendFragment
public void sendFragment(boolean more,
byte opcode,
byte[] content,
int offset,
int length)
throws IOException
-
- Specified by:
sendFragment in interface WebSocket.Outbound
- Throws:
IOException
disconnect
public void disconnect(int code,
String message)
- Specified by:
disconnect in interface WebSocket.Outbound
disconnect
public void disconnect()
- Specified by:
disconnect in interface WebSocket.Outbound
fillBuffersFrom
public void fillBuffersFrom(Buffer buffer)
- Specified by:
fillBuffersFrom in interface WebSocketConnection
doTheHixieHixieShake
public static byte[] doTheHixieHixieShake(long key1,
long key2,
byte[] key3)
handshake
public void handshake(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String origin,
String subprotocol)
throws IOException
- Specified by:
handshake in interface WebSocketConnection
- Throws:
IOException
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.