WebSocket MembersC# API

The WebSocket type exposes the following members.
Constructors

  NameDescription
Public methodWebSocket
For internal use only. Of no interest to the user.
Back to Top
Methods

  NameDescription
Public methodClearHeaders
Clears the list of HTTP headers for this WebSocket.
Public methodClose
Closes the WebSocket.
Public methodContainsHeader
Determines whether this WebSocket contains a particular HTTP header.
Public methodDispose
Releases all resources used by the WebSocket
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic membergetCPtr
For internal use only. Of no interest to the user.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetHeaderValue
Gets the value of the specified HTTP request header.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpen
Opens the WebSocket.
Public methodRemoveHeader
Removes an HTTP header from this WebSocket.
Public methodSendMessage(String)
Send a text message to the server.
Public methodSendMessage(WebSocketMessage)
Send a message to the server.
Public methodSendMessage( Byte , Boolean)
Send a message to the server.
Public methodSendMessageFromFile(String, Boolean)
Send a message to the server, by loading the message data from a file.
Public methodSendMessageFromFile(String, Boolean, Int32)
Send a message to the server, by loading the message data from a file.
Public methodSetHeader(String)
Sets an HTTP header to use in the opening handshake request for this WebSocket, using the contents of the specified string.
Public methodSetHeader(String, String)
Sets an HTTP header to use in the opening handshake request for this WebSocket, as a name/value pair.
Public methodSetReferer
Sets the value of the "Referer" HTTP header.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnsetReferer
Removes the "Referer" HTTP header.
Back to Top
Properties

  NameDescription
Public propertyContentType
Gets or sets the value of the "Content-Type" HTTP header.
Public propertyHasReferer
Gets a value that indicates whether the "Referer" HTTP header has been set for this Request.
Public propertyHeaderKeys
Gets a list of names of all the HTTP request headers set in this Request.
Public propertyID
Gets the unique ID that has been assigned to this WebSocket.
Public propertyReferer
Gets or sets the value of the "Referer" HTTP header.
Public propertyUrl
Gets or sets the Url that this WebSocket is targeting.
Public propertyUserAgent
Gets or sets the value of the "User-Agent" HTTP header.
Public propertyVU
Gets the VirtualUser instance that this WebSocket is associated with.
Back to Top
Events

  NameDescription
Public eventClosed
Occurs when the WebSocket is closed.
Public eventError
Occurs when an error occurs on the WebSocket.
Public eventReceivedMessage
Occurs when a message is received from the server
Back to Top
See Also