socket.io-client-csharp
socket.io-client-csharp copied to clipboard
How use proxy in version 3.0.6?
I did upgrade for 3.0.6 version and i have a problem. Until verson 3.0.5, existed a class DefaultClientWebSocket. I used it for change ConfigOptions and set Proxy and certificateValidationCallback.
SocketIOClient.ClientWebSocketProvider = () =>
{
var clientWebSocket = new DefaultClientWebSocket()
{
ConfigOptions = o =>
{
if (o != null)
{
var options = o as ClientWebSocketOptions;
options!.Proxy = _proxy;
options.RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) =>
{
return true;
};
}
}
};
return clientWebSocket;
};
How use it in 3.0.6 version?
Any update about this?
sorry the doc is out of date, for newer version:
io.ClientWebSocketProvider = () =>
{
var client = new DefaultClientWebSocket();
client.SetProxy(...);
client.AddHeader(...);
return client;
};
For ignoring ssl, is ConfigOptions still relevant? Because when i use it, visual studio throw an error "DefaultClientWebSocket does not contain a definition for ConfigOptions". Btw thank u for maintaning this library