Modified a few for Example
This commit is contained in:
parent
74ec969758
commit
56554c5210
@ -11,12 +11,12 @@ namespace Example
|
|||||||
{
|
{
|
||||||
/* Create a new instance of the WebSocket class.
|
/* Create a new instance of the WebSocket class.
|
||||||
*
|
*
|
||||||
* The WebSocket class inherits the System.IDisposable interface, so you can use the using
|
* The WebSocket class inherits the System.IDisposable interface, so you can use
|
||||||
* statement. The WebSocket connection has been closed with close status 1001 (going away)
|
* the using statement. And the WebSocket connection has been closed with close
|
||||||
* when the control leaves the using block.
|
* status 1001 (going away) when the control leaves the using block.
|
||||||
*
|
*
|
||||||
* If you would like to connect to the server with the secure connection, you should create
|
* If you would like to connect to the server with the secure connection, you should
|
||||||
* the instance with the wss scheme WebSocket URL.
|
* create the instance with the wss scheme WebSocket URL.
|
||||||
*/
|
*/
|
||||||
using (var nf = new Notifier ())
|
using (var nf = new Notifier ())
|
||||||
using (var ws = new WebSocket ("ws://echo.websocket.org"))
|
using (var ws = new WebSocket ("ws://echo.websocket.org"))
|
||||||
@ -65,11 +65,12 @@ namespace Example
|
|||||||
// To negotiate the Per-message Compression extension.
|
// To negotiate the Per-message Compression extension.
|
||||||
//ws.Compression = CompressionMethod.Deflate;
|
//ws.Compression = CompressionMethod.Deflate;
|
||||||
|
|
||||||
// To validate the server certificate.
|
/* To validate the server certificate.
|
||||||
//ws.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => {
|
ws.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => {
|
||||||
// ws.Log.Debug (String.Format ("\n{0}\n{1}", certificate.Issuer, certificate.Subject));
|
ws.Log.Debug (String.Format ("\n{0}\n{1}", certificate.Issuer, certificate.Subject));
|
||||||
// return true; // If the server certificate is valid.
|
return true; // If the server certificate is valid.
|
||||||
//};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
// To set the credentials for the HTTP Authentication (Basic/Digest).
|
// To set the credentials for the HTTP Authentication (Basic/Digest).
|
||||||
//ws.SetCredentials ("nobita", "password", false);
|
//ws.SetCredentials ("nobita", "password", false);
|
||||||
|
Loading…
Reference in New Issue
Block a user