public SetCookies ( WebSocketSharp.Net.CookieCollection cookies ) : void | ||
cookies | WebSocketSharp.Net.CookieCollection | |
return | void |
// As server private HandshakeResponse createHandshakeResponse() { var res = new HandshakeResponse (); res.AddHeader ("Sec-WebSocket-Accept", createResponseKey ()); if (_protocol.Length > 0) res.AddHeader ("Sec-WebSocket-Protocol", _protocol); if (_extensions.Length > 0) res.AddHeader ("Sec-WebSocket-Extensions", _extensions); if (_cookies.Count > 0) res.SetCookies (_cookies); return res; }
// As server private HandshakeResponse createHandshakeResponse() { var res = new HandshakeResponse (HttpStatusCode.SwitchingProtocols); var headers = res.Headers; headers ["Sec-WebSocket-Accept"] = CreateResponseKey (_base64Key); if (_protocol != null) headers ["Sec-WebSocket-Protocol"] = _protocol; if (_extensions != null) headers ["Sec-WebSocket-Extensions"] = _extensions; if (_cookies.Count > 0) res.SetCookies (_cookies); return res; }