Package com.wowza.wms.websocket.model
Class WebSocketContext
Object
com.wowza.wms.websocket.model.WebSocketContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final boolean
static final int
static final long
static final long
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Get time in milliseconds between idle eventslong
Get the maximum WebSocket message size for a single message (0 = no limit)int
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
Not being used currentlyint
Get the timeout (milliseconds) that we wait for a response (pong) to a ping messageint
Get time in milliseconds between validation messages (ping from server to client).boolean
Should outgoing messages be masked (many browsers do not support masked outgoing messages)void
setIdleFrequency
(int idleFrequency) Set time in milliseconds between idle eventsvoid
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 currentlyvoid
setPingTimeout
(int pingTimeout) Set the timeout (milliseconds) that we wait for a response (pong) to a ping messagevoid
setValidationFrequency
(int validationFrequency) Set time in milliseconds between validation messages (ping from server to client).
-
Field Details
-
DEFAULT_MAXMESSAGESIZE
public static final long DEFAULT_MAXMESSAGESIZE- See Also:
-
DEFAULT_PACKETFRAGMENTATIONSIZE
public static final long DEFAULT_PACKETFRAGMENTATIONSIZE- See Also:
-
DEFAULT_IDLEFREQUENCY
public static final int DEFAULT_IDLEFREQUENCY- See Also:
-
DEFAULT_VALIDATIONFREQUENCY
public static final int DEFAULT_VALIDATIONFREQUENCY- See Also:
-
DEFAULT_MASKOUTGOINGMESSAGES
public static final boolean DEFAULT_MASKOUTGOINGMESSAGES- See Also:
-
DEFAULT_MAXIMUMPENDINGWRITEBYTES
public static final int DEFAULT_MAXIMUMPENDINGWRITEBYTES- See Also:
-
DEFAULT_PINGTIMEOUT
public static final int DEFAULT_PINGTIMEOUT- See Also:
-
-
Constructor Details
-
WebSocketContext
public WebSocketContext()
-
-
Method Details
-
getMaximumMessageSize
public long getMaximumMessageSize()Get the maximum WebSocket message size for a single message (0 = no limit)- Returns:
- maximum WebSocket message size
-
setMaximumMessageSize
public void setMaximumMessageSize(long maxMessageSize) Set the maximum WebSocket message size for a single message (0 = no limit)- Parameters:
maxMessageSize
- maximum WebSocket message size
-
isMaskOutgoingMessages
public boolean isMaskOutgoingMessages()Should outgoing messages be masked (many browsers do not support masked outgoing messages)- Returns:
- true, if messages are masked
-
setMaskOutgoingMessages
public void setMaskOutgoingMessages(boolean maskOutgoingMessages) Should outgoing messages be masked (many browsers do not support masked outgoing messages)- Parameters:
maskOutgoingMessages
- true, if messages are masked
-
getIdleFrequency
public int getIdleFrequency()Get time in milliseconds between idle events- Returns:
- idle time (milliseconds)
-
setIdleFrequency
public void setIdleFrequency(int idleFrequency) Set time in milliseconds between idle events- Parameters:
idleFrequency
- idle time (milliseconds)
-
getPacketFragmentationSize
public long getPacketFragmentationSize()Not being used currently- Returns:
- not being used
-
setPacketFragmentationSize
public void setPacketFragmentationSize(long packetFragmentationSize) Not being used currently- Parameters:
packetFragmentationSize
- not being used
-
getValidationFrequency
public int getValidationFrequency()Get time in milliseconds between validation messages (ping from server to client). Value of zero turns off validation.- Returns:
- validation time (milliseconds)
-
setValidationFrequency
public void setValidationFrequency(int validationFrequency) Set time in milliseconds between validation messages (ping from server to client). Value of zero turns off validation.- Parameters:
validationFrequency
- validation time (milliseconds)
-
getMaximumPendingWriteBytes
public 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)- Returns:
- number of bytes that can be pending waiting
-
setMaximumPendingWriteBytes
public 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)- Parameters:
maximumPendingWriteBytes
- number of bytes that can be pending waiting
-
getPingTimeout
public int getPingTimeout()Get the timeout (milliseconds) that we wait for a response (pong) to a ping message- Returns:
- timeout (milliseconds)
-
setPingTimeout
public void setPingTimeout(int pingTimeout) Set the timeout (milliseconds) that we wait for a response (pong) to a ping message- Parameters:
pingTimeout
- timeout (milliseconds)
-