You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My old code uses "client" and "stream" variables from above in literally a million places. So im wondering if your WebSocket class has some equivalent to theses so that i dont have to rewrite all my code? Im starting off using your example like this below
var server = new WebSocketServer("wss://0.0.0.0:8431");
server.Certificate = new X509Certificate2("MyCert.pfx");
server.Start(socket =>
{
TclClient client=socket.client; <---- Do you have this??
Stream stream=socket.stream; <---- Do you have this???
// send and receive on the stream
});
Do you have a way where i can obtain the TcpClient and Stream from your "socket" iWebSocketConnection variable above?
Thanks
The text was updated successfully, but these errors were encountered:
Hello,
Im upgrading my old C# server code from using regular TCP Sockets, to using your secure WebSocket (wss://)
My old code looks like this
TcpListener serverSocket;
....
TcpClient client = serverSocket.AcceptTcpClient();
Stream stream = new SslStream(client.GetStream(), false);
My old code uses "client" and "stream" variables from above in literally a million places. So im wondering if your WebSocket class has some equivalent to theses so that i dont have to rewrite all my code? Im starting off using your example like this below
var server = new WebSocketServer("wss://0.0.0.0:8431");
server.Certificate = new X509Certificate2("MyCert.pfx");
server.Start(socket =>
{
TclClient client=socket.client; <---- Do you have this??
Stream stream=socket.stream; <---- Do you have this???
// send and receive on the stream
});
Do you have a way where i can obtain the TcpClient and Stream from your "socket" iWebSocketConnection variable above?
Thanks
The text was updated successfully, but these errors were encountered: