Table of Contents

Delegate WebSocket.MessageReceivedEventHandler

Namespace
System.Net.WebSockets
Assembly
System.Net.WebSockets.dll

Occurs when a message is received. Controller messages are handled internally and do not raise an event.

public delegate void WebSocket.MessageReceivedEventHandler(object sender, MessageReceivedEventArgs e)

Parameters

sender object
Occurs when a message is received. Controller messages are handled internally and do not raise an event.
e MessageReceivedEventArgs
Occurs when a message is received. Controller messages are handled internally and do not raise an event.
Extension Methods

Remarks

The WebSocket will stop to receive any incoming messages including controller messages until the provided ReceiveMessageStream is completely read till the end.

Constructors

MessageReceivedEventHandler(object, IntPtr)

public MessageReceivedEventHandler(object @object, IntPtr method)

Parameters

object object
method IntPtr

Methods

BeginInvoke(object, MessageReceivedEventArgs, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(object sender, MessageReceivedEventArgs e, AsyncCallback callback, object @object)

Parameters

sender object
e MessageReceivedEventArgs
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(IAsyncResult)

public virtual void EndInvoke(IAsyncResult result)

Parameters

result IAsyncResult

Invoke(object, MessageReceivedEventArgs)

public virtual void Invoke(object sender, MessageReceivedEventArgs e)

Parameters

sender object
e MessageReceivedEventArgs