Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

UWP Beispiel: WebSockets

26.06.2018 (👁4965)

UWP Beispiel:

 

# WebSocket sample

Shows how to send and receive data using the WebSocket classes in the [Windows.Networking.Sockets](

http://msdn.microsoft.com/library/windows/apps/br226960)
namespace.

 

 

UTF8 Beispiel

This scenario uses a MessageWebSocket to send UTF-8 strings.

The sample server supports both plaintext WebSocket (ws://) and secure WebSocket (wss://) server endpoints.

 

Scenario2 Binary:

This scenario shows how to use a StreamWebSocket to send binary data.

The sample server supports both plaintext WebSocket (ws://) and secure WebSocket (wss://) server endpoints.

This scenario shows how to use a StreamWebSocket with a client certificate to connect to a server.

                The sample server (localhost) requires requires a secure WebSocket (wss://) connection with a client certificate.

                The StreamWebSocket client certificate property behaves the same as the MessageWebSocket client certificate property.

 

 

This scenario uses a MessageWebSocket to send partial or complete messages.

                The sample server supports both plaintext WebSocket (ws://) and secure WebSocket (wss://) server endpoints.

 

 

http://msdn.microsoft.com/library/windows/apps/br226960

Windows.Networking.Sockets Namespace

Stellt Sockets- und WebSockets-Klassen zur Verwendung für die Netzwerkkommunikation und Klassen für Echtzeitnetzwerkbenachrichtigungen bereit, die im Hintergrund für Windows Store-Apps empfangen werden.

https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/WebSocket

hows how to send and receive data using the WebSocket classes in the Windows.Networking.Sockets namespace.

 

The sample demonstrates the following:

 

Making a WebSocket connection, sending and receiving data, and closing the connection.

Handling both trusted (hard coded) URI inputs and unvalidated (user-entered) URI inputs.

Accessing the server certificate information and perform custom validation (if needed) when using a secure Websocket (wss://) endpoint.

Providing a custom client certificate to use when establishing a secure Websocket connection.