public interface IWebSocketSession
| Modifier and Type | Method | Description |
|---|---|---|
void |
close(boolean immediately,
int reasonCode,
String reasonStr) |
Close the WebSocket session
|
String |
getContextStr() |
Get context string for logging
|
ElapsedTimer |
getElapsedTime() |
Get the time the WebSocket session has been alive
|
IWebSocketEventNotify |
getEventListener() |
Get the listener object that receives WebSockets events
|
java.util.Map<String,String> |
getHeaderMap() |
Get map of HTTP headers from original upgrade HTTP request
|
IHTTPProvider |
getHTTPProvider() |
Get the HTTPProvider that is the parent of this WebSocket session
|
com.wowza.wms.http.HTTPRequest |
getHTTPRequest() |
Get HTTPRequest object
|
int |
getIdleFrequency() |
Get time in milliseconds between idle events
|
IOPerformanceCounter |
getIOPerformanceCounter() |
Get IO performance counter that tracks incoming and outgoing TCP traffic
|
org.apache.mina.common.IoSession |
getIoSession() |
Get the low level IOSession for this websocket
|
Object |
getLock() |
Get the internal synchronization lock for this session
|
long |
getMaximumMessageSize() |
Get the maximum WebSocket message size for a single message (0 = no limit)
|
int |
getMaximumPendingWriteBytes() |
Get the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)
|
long |
getPacketFragmentationSize() |
Not being used currently
|
java.util.Map<String,java.util.List<String>> |
getParameterMap() |
Get map of HTTP parameters from original upgrade HTTP request
|
int |
getPingTimeout() |
Get the timeout (milliseconds) that we wait for a response (pong) to a ping message
|
WMSProperties |
getProperties() |
Get user properties
|
String |
getQueryString() |
Get query string from original upgrade HTTP request
|
String |
getRemoteHost() |
Get remote host
|
String |
getRemoteIpAddress() |
Get the remote Ip address
|
String |
getRequestedDomainName() |
|
String |
getReqURI() |
Get request URI from original upgrade HTTP request
|
String |
getReqURL() |
Get request URL from original upgrade HTTP request
|
int |
getSessionId() |
Get WebSocket session Id
|
int |
getValidationFrequency() |
Get time in milliseconds between validation messages (ping from server to client).
|
boolean |
isActive() |
True if WebSocket session is still active, false if close has been called but session is still connected (waiting to close)
|
boolean |
isMaskOutgoingMessages() |
Should outgoing messages be masked (many browsers do not support masked outgoing messages)
|
void |
ping(IWebSocketPingResult pingResult) |
Send a ping message from server to client
|
void |
sendMessage(WebSocketMessage message) |
Send a WebSocket message from server to client
|
void |
setHTTPRequest(com.wowza.wms.http.HTTPRequest httpRequest) |
Set HTTPRequest object
|
void |
setIdleFrequency(int idleFrequency) |
Set time in milliseconds between idle events
|
void |
setMaskOutgoingMessages(boolean maskOutgoingMessages) |
Should outgoing messages be masked (many browsers do not support masked outgoing messages)
|
void |
setMaximumMessageSize(long maxMessageSize) |
Set the maximum WebSocket message size for a single message (0 = no limit)
|
void |
setMaximumPendingWriteBytes(int maximumPendingWriteBytes) |
Set the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)
|
void |
setPacketFragmentationSize(long packetFragmentationSize) |
Not being used currently
|
void |
setPingTimeout(int pingTimeout) |
Set the timeout (milliseconds) that we wait for a response (pong) to a ping message
|
void |
setRemoteHost(String remoteHost) |
Set remote host
|
void |
setRemoteIpAddress(String remoteIpAddress) |
Set remote Ip address
|
void |
setValidationFrequency(int validationFrequency) |
Set time in milliseconds between validation messages (ping from server to client).
|
static final String CHARENCODING
static final int CLOSECODE_ABNORMAL
static final int CLOSECODE_GOINGAWAY
static final int CLOSECODE_INTERNALSERVER
static final int CLOSECODE_INVALIDFRAME
static final int CLOSECODE_MANDATORYEXT
static final int CLOSECODE_MESSAGETOOBIG
static final int CLOSECODE_NORMAL
static final int CLOSECODE_NOSTATUSRECEIVED
static final int CLOSECODE_POLICYVIOLATION
static final int CLOSECODE_PROTOCOLERROR
static final int CLOSECODE_RESERVED
static final int CLOSECODE_TLSHANDSHAKE
static final int CLOSECODE_UNSUPPORTEDDATA
static final String CLOSESTR_ABNORMAL
static final String CLOSESTR_GOINGAWAY
static final String CLOSESTR_INTERNALSERVER
static final String CLOSESTR_INVALIDFRAME
static final String CLOSESTR_MANDATORYEXT
static final String CLOSESTR_MESSAGETOOBIG
static final String CLOSESTR_NORMAL
static final String CLOSESTR_NOSTATUSRECEIVED
static final String CLOSESTR_POLICYVIOLATION
static final String CLOSESTR_PROTOCOLERROR
static final String CLOSESTR_RESERVED
static final String CLOSESTR_TLSHANDSHAKE
static final String CLOSESTR_UNSUPPORTEDDATA
static final int CLOSETIMEOUT
static final String HTTPHEADER_NAME
static final String HTTPHEADER_SECACCEPT
static final String HTTPHEADER_SECKEY
static final int PINGWOWZAID
static final String SECURITY_DIGEST_ALGORITHM
static final String SECURITY_GUID
void close(boolean immediately,
int reasonCode,
String reasonStr)
immediately - if true, session will be terminated immediately by closing TCP connection, if false close command will be sentreasonCode - reason for close, see CLOSECODE_*reasonStr - reason string for close, see CLOSESTR_*String getContextStr()
ElapsedTimer getElapsedTime()
IWebSocketEventNotify getEventListener()
java.util.Map<String,String> getHeaderMap()
IHTTPProvider getHTTPProvider()
com.wowza.wms.http.HTTPRequest getHTTPRequest()
int getIdleFrequency()
IOPerformanceCounter getIOPerformanceCounter()
org.apache.mina.common.IoSession getIoSession()
Object getLock()
long getMaximumMessageSize()
int getMaximumPendingWriteBytes()
long getPacketFragmentationSize()
java.util.Map<String,java.util.List<String>> getParameterMap()
int getPingTimeout()
WMSProperties getProperties()
String getQueryString()
String getRemoteHost()
String getRemoteIpAddress()
String getRequestedDomainName()
String getReqURI()
String getReqURL()
int getSessionId()
int getValidationFrequency()
boolean isActive()
boolean isMaskOutgoingMessages()
void ping(IWebSocketPingResult pingResult)
pingResult - callback object when pong messages is received or ping message timesoutvoid sendMessage(WebSocketMessage message)
message - WebSocket messagevoid setHTTPRequest(com.wowza.wms.http.HTTPRequest httpRequest)
HTTPRequest - void setIdleFrequency(int idleFrequency)
idleFrequency - idle time (milliseconds)void setMaskOutgoingMessages(boolean maskOutgoingMessages)
maskOutgoingMessages - true, if messages are maskedvoid setMaximumMessageSize(long maxMessageSize)
maxMessageSize - maximum WebSocket message sizevoid setMaximumPendingWriteBytes(int maximumPendingWriteBytes)
maximumPendingWriteBytes - number of bytes that can be pending waitingvoid setPacketFragmentationSize(long packetFragmentationSize)
packetFragmentationSize - not being usedvoid setPingTimeout(int pingTimeout)
pingTimeout - timeout (milliseconds)void setRemoteHost(String remoteHost)
remoteHost - remote hostvoid setRemoteIpAddress(String remoteIpAddress)
remoteIpAddress - remote Ip addressvoid setValidationFrequency(int validationFrequency)
validationFrequency - validation time (milliseconds)