File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,31 @@ server.Start(socket =>
48
48
});
49
49
```
50
50
51
+ SubProtocol Negotiation
52
+ ---
53
+
54
+ To enable negotiation of subprotocols, specify the supported protocols on
55
+ the ` WebSocketServer.SupportedSubProtocols ` property. The negotiated
56
+ subprotocol will be available on the socket's ` ConnectionInfo.NegotiatedSubProtocol ` .
57
+
58
+ If no supported subprotocols are found on the client request (the
59
+ Sec-WebSocket-Protocol header), the connection will be closed.
60
+
61
+ ``` cs
62
+ var server = new WebSocketServer (" ws://localhost:8181" );
63
+ server .SupportedSubProtocols = new []{ " superchat" , " chat" };
64
+ server .Start (socket =>
65
+ {
66
+ // socket.ConnectionInfo.NegotiatedSubProtocol is populated
67
+ });
68
+ ```
69
+
51
70
License
52
71
---
53
72
54
73
The MIT License
55
74
56
- Copyright (c) 2010-2012 Jason Staten
75
+ Copyright (c) 2010-2013 Jason Staten
57
76
58
77
Permission is hereby granted, free of charge, to any person obtaining a copy
59
78
of this software and associated documentation files (the "Software"), to deal
You can’t perform that action at this time.
0 commit comments