I have a C# class to manage a connection between a server and a win forms app. This class sets up a message queue and sends and receives data across the Socket. My original intention was to use the same class on both the client and the server to manage messaging. However on the server the Web Socket object is a System.net.websocket and on the client it is a ClienWebSocket that extends WebSocket. I have tried just casting the WebSocket object as a ClientWebSockets because one inherits the other however this is not working. Is there anyway I can get a common object type for WebSockets that will work on both sides of the connection?
Thanks