Skip to content

Commit acde107

Browse files
committed
Modified validating the cookies from client
1 parent 93b30f9 commit acde107

File tree

3 files changed

+165
-132
lines changed

3 files changed

+165
-132
lines changed

Example2/Echo.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
using WebSocketSharp.Net;
44
using WebSocketSharp.Server;
55

6-
namespace Example2 {
7-
6+
namespace Example2
7+
{
88
public class Echo : WebSocketService
99
{
10-
protected override void OnMessage(MessageEventArgs e)
10+
protected override void OnMessage (MessageEventArgs e)
1111
{
12-
var msg = QueryString.Contains("name")
13-
? String.Format("'{0}' returns to {1}", e.Data, QueryString["name"])
12+
var msg = QueryString.Contains ("name")
13+
? String.Format ("Returns '{0}' to {1}", e.Data, QueryString ["name"])
1414
: e.Data;
15-
Send(msg);
15+
Send (msg);
1616
}
1717

18-
protected override bool ProcessCookies(CookieCollection request, CookieCollection response)
18+
protected override bool ValidateCookies (CookieCollection request, CookieCollection response)
1919
{
2020
foreach (Cookie cookie in request)
2121
{
2222
cookie.Expired = true;
23-
response.Add(cookie);
23+
response.Add (cookie);
2424
}
2525

2626
return true;

0 commit comments

Comments
 (0)