ClassWebSocket
The WebSocket class represents a "tunnel" through which WebSocket messages flow. The class' messages may be deserialized from a SAZ file.
Definition
Namespace:Fiddler
Assembly:FiddlerCore.dll
Syntax:
public class WebSocket : BaseTunnel, ITunnel
Inheritance: objectBaseTunnelWebSocket
Implements:
Inherited Members
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
oSess
The session for which this tunnel was initially created.
oFrom
The client pipe
oTo
The server pipe
Fields
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
listMessages
Gets the list of captured WebSocket messages
Declaration
public List<WebSocketMessage> listMessages
Field Value
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
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
Overrides
MessageCount
Gets the number of captured WebSocket messages currently
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.
StartReceiveFromClient()
Called when we have received data from the local client.
StartReceiveFromServer()
Called when we have received data from the remote host. Incoming data will immediately be forwarded to the local client.