HTTP and WebSocket implementation in C#