Class WebSocket
The WebSocket class represents a "tunnel" through which WebSocket messages flow. The class' messages may be deserialized from a SAZ file.
Inherited Members
Namespace: Fiddler
Assembly: FiddlerCore.dll
Syntax
public class WebSocket : BaseTunnel, ITunnel
Constructors
WebSocket(Session, ClientPipe, ServerPipe)
Creates a WebSocket tunnel. External callers instead use the CreateTunnel static method.
Declaration
public WebSocket(Session oSess, ClientPipe oFrom, ServerPipe oTo)
Parameters
Session
oSess
The session for which this tunnel was initially created. |
Client The client pipe |
Server The server pipe |
Fields
listMessages
Gets the list of captured WebSocket messages
Declaration
public List<WebSocketMessage> listMessages
Field Value
System.
|
WebsocketMessageEncodingRegex
Used to check if there is encoding applied to a WebSocket connection by matching text in response headers
Declaration
public static readonly string WebsocketMessageEncodingRegex
Field Value
System.
|
Properties
EgressByteCount
Returns number of bytes sent from the Client to the Server on this WebSocket
Declaration
public override long EgressByteCount { get; protected set; }
Property Value
System.
|
Overrides
IngressByteCount
Returns number of bytes sent from the Server to the Client on this WebSocket
Declaration
public override long IngressByteCount { get; protected set; }
Property Value
System.
|
Overrides
MessageCount
Gets the number of captured WebSocket messages currently
Declaration
public int MessageCount { get; }
Property Value
System.
|
Methods
DoCloseTunnelAsync()
Interface Method Close the WebSocket and signal the event to let its service thread die. Also called by oSession.Abort() WARNING: This should not be allowed to throw any exceptions, because it will do so on threads that don't catch them, and this will kill the application.
Declaration
public override Task DoCloseTunnelAsync()
Returns
System.
|
Overrides
StartReceiveFromClient()
Called when we have received data from the local client.
Declaration
protected Task StartReceiveFromClient()
Returns
System.
|
StartReceiveFromServer()
Called when we have received data from the remote host. Incoming data will immediately be forwarded to the local client.
Declaration
protected Task StartReceiveFromServer()
Returns
System.
|
ToString()
Declaration
public override string ToString()
Returns
System.
|