public UriQuery(UriQuery query) : this() { foreach (var kv in query) { queries.Add(kv.Key, kv.Value); } }
public WebSocketIO(string uri, UriQuery query, int eio = EIO, string transport = TRANSPORT) : this() { UriBuilder webSocketUri = new UriBuilder(uri); if (!string.Equals(webSocketUri.Scheme, "ws")) { throw new Exception("Not a web socket url scheme."); } UriQuery uriQuery = new UriQuery(query); uriQuery.SetKey("EIO", eio); uriQuery.SetKey("transport", transport); webSocketUri.Query = uriQuery.ToQueryString(); webSocketUri.Path += "socket.io/"; m_webSocket = new WebSocket(webSocketUri.ToString()); }