Skip to main content
MessageWebSocket.MessageReceived | messagereceived event

Applies to Windows and Windows Phone

An event that indicates that a message was received on the MessageWebSocket object.

Syntax


function onMessageReceived(eventArgs) { /* Your code */ }
 
// addEventListener syntax
messageWebSocket.addEventListener("messagereceived", onMessageReceived);
messageWebSocket.removeEventListener("messagereceived", onMessageReceived);
 
- or -

messageWebSocket.onmessagereceived = onMessageReceived;

public event TypedEventHandler<MessageWebSocket, MessageWebSocketMessageReceivedEventArgs> MessageReceived

Public Event MessageReceived As TypedEventHandler(Of MessageWebSocket, MessageWebSocketMessageReceivedEventArgs)

public:
event TypedEventHandler<MessageWebSocket, MessageWebSocketMessageReceivedEventArgs>^ MessageReceived {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<MessageWebSocket, MessageWebSocketMessageReceivedEventArgs>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

Delegate TypedEventHandler<MessageWebSocket, MessageWebSocketMessageReceivedEventArgs>

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

DLL

Windows.Networking.dll

See also

MessageWebSocket