Class WebSocketMessage
A WebSocketMessage stores a single frame of a single WebSocket message http://tools.ietf.org/html/rfc6455
Inheritance
Inherited Members
Namespace: Fiddler
Assembly: FiddlerCore.dll
Syntax
public class WebSocketMessage
Fields
Timers
The WebSocketTimers collection tracks the timestamps for this message
Declaration
public WebSocketTimers Timers
Field Value
WebSocketTimers
|
Properties
FrameType
iCloseReason
Declaration
[CodeDescription("If this is a Close frame, returns the close code. Otherwise, returns -1.")]
public int iCloseReason { get; }
Property Value
System.Int32
|
ID
Declaration
public int ID { get; }
Property Value
System.Int32
|
IsFinalFrame
Declaration
public bool IsFinalFrame { get; }
Property Value
System.Boolean
|
IsOutbound
Declaration
[CodeDescription("Returns TRUE if this is a Client->Server message, FALSE if this is a message from Server->Client.")]
public bool IsOutbound { get; }
Property Value
System.Boolean
|
MaskingKey
Declaration
[CodeDescription("Returns the WebSocketMessage's masking key, if any.")]
public byte[] MaskingKey { get; }
Property Value
System.Byte[]
|
PayloadData
Declaration
[CodeDescription("Returns the raw payload data, which may be masked.")]
public byte[] PayloadData { get; }
Property Value
System.Byte[]
|
PayloadLength
Declaration
public int PayloadLength { get; }
Property Value
System.Int32
|
WasAborted
Declaration
[CodeDescription("Indicates whether this WebSocketMessage was aborted.")]
public bool WasAborted { get; }
Property Value
System.Boolean
|
Methods
Abort()
Declaration
[CodeDescription("Cancel transmission of this WebSocketMessage.")]
public void Abort()
PayloadAsBytes()
Copy the WebSocketMessage's payload into a new Byte Array.
Declaration
[CodeDescription("Returns the WebSocketMessage's payload as byte[], unmasking if needed.")]
public byte[] PayloadAsBytes()
Returns
System.Byte[]
A new byte array containing the (unmasked) payload. |
PayloadAsString()
Return the WebSocketMessage's payload as a string.
Declaration
[CodeDescription("Returns the WebSocketMessage's payload as a string, unmasking if needed.")]
public string PayloadAsString()
Returns
System.String
|
SetPayload(Byte[])
Copies the provided byte array over the WebSocketMessage's payload, masking if needed.
Declaration
[CodeDescription("Replaces the WebSocketMessage's payload with the specified byte array, masking if needed.")]
public void SetPayload(byte[] arrNewPayload)
Parameters
System.Byte[]
arrNewPayload
|
SetPayload(String)
Replaces the WebSocketMessage's payload with the specified string, masking if needed.
Declaration
[CodeDescription("Replaces the WebSocketMessage's payload with the specified string, masking if needed.")]
public void SetPayload(string sPayload)
Parameters
System.String
sPayload
|
ToByteArray()
Declaration
[CodeDescription("Returns the entire WebSocketMessage, including headers.")]
public byte[] ToByteArray()
Returns
System.Byte[]
|
ToString()
Declaration
[CodeDescription("Returns all info about this message.")]
public override string ToString()
Returns
System.String
|