Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3455 commits
Select commit Hold shift + click to select a range
9d13553
[Modify] Edit it
sta Jun 4, 2025
b68b4b1
[Modify] Edit it
sta Jun 4, 2025
ebd7a97
[Modify] Edit it
sta Jun 5, 2025
aaa6293
[Modify] Edit it
sta Jun 5, 2025
49dda16
[Modify] Polish it
sta Jun 6, 2025
07dc675
[Modify] Edit it
sta Jun 6, 2025
90c3277
[Modify] Edit it
sta Jun 6, 2025
8043c17
[Modify] Edit it
sta Jun 7, 2025
3f44645
[Modify] Polish it
sta Jun 8, 2025
90dbff9
[Modify] Edit it
sta Jun 8, 2025
dcea409
[Modify] Edit it
sta Jun 8, 2025
bb27410
[Modify] Edit it
sta Jun 9, 2025
1165bf2
[Modify] Polish it
sta Jun 10, 2025
3213df7
[Modify] Edit it
sta Jun 10, 2025
5b577d9
[Modify] Edit it
sta Jun 10, 2025
0762d05
[Modify] Edit it
sta Jun 11, 2025
0cbf195
[Modify] Polish it
sta Jun 12, 2025
5b51052
[Modify] Polish it
sta Jun 13, 2025
0041070
[Modify] Polish it
sta Jun 14, 2025
1cfead4
[Modify] Polish it
sta Jun 15, 2025
6ac1bf3
[Modify] Polish it
sta Jun 16, 2025
51ae1bc
[Modify] Polish it
sta Jun 17, 2025
b7903b6
[Modify] Polish it
sta Jun 18, 2025
28e1d49
[Modify] Polish it
sta Jun 19, 2025
79663e3
[Modify] Polish it
sta Jun 20, 2025
a304b6c
[Modify] Polish it
sta Jun 21, 2025
0183e05
[Modify] Polish it
sta Jun 22, 2025
55fdfb8
[Modify] Polish it
sta Jun 23, 2025
86dee99
[Modify] Polish it
sta Jun 24, 2025
907af94
[Modify] Polish it
sta Jun 25, 2025
467a6e1
[Modify] Polish it
sta Jun 26, 2025
231ba90
[Modify] Polish it
sta Jun 27, 2025
855f028
[Modify] Polish it
sta Jun 28, 2025
34bcfd7
[Modify] Polish it
sta Jun 29, 2025
2d90062
[Modify] Polish it
sta Jun 30, 2025
c04c0db
[Modify] Add it
sta Jul 1, 2025
8f39190
[Modify] It is restricted
sta Jul 2, 2025
e28c6e1
[Modify] It is restricted
sta Jul 3, 2025
9705448
[Modify] Polish it
sta Jul 4, 2025
3df97bb
[Modify] It is restricted
sta Jul 5, 2025
543a06e
[Modify] It is restricted
sta Jul 6, 2025
1554ade
[Modify] It is restricted
sta Jul 7, 2025
73f30a4
[Modify] It is restricted
sta Jul 8, 2025
3cff458
[Modify] It is restricted
sta Jul 9, 2025
ef6929b
[Modify] It is restricted
sta Jul 9, 2025
a4c5566
[Modify] It is restricted
sta Jul 10, 2025
941d09b
[Modify] It is restricted
sta Jul 11, 2025
51fc9fa
[Modify] Send it if any
sta Jul 12, 2025
75b2c06
[Modify] Return it if any
sta Jul 13, 2025
09a25e2
[Modify] Add the SetUserHeader method
sta Jul 14, 2025
66d9a55
[Modify] Log it
sta Jul 15, 2025
71d85bd
[Modify] Send it
sta Jul 16, 2025
87e788b
[Modify] Add the UserHeadersResponder property
sta Jul 17, 2025
1afb037
[Modify] Polish it
sta Jul 18, 2025
e6c7064
[Modify] Return it
sta Jul 19, 2025
5b55d71
[Modify] Log it
sta Jul 20, 2025
7d19b37
[Modify] Polish it
sta Jul 21, 2025
80e78a4
[Modify] Add the HandshakeResponseHeaders property
sta Jul 22, 2025
d978b13
[Modify] Receive it
sta Jul 23, 2025
05d30e3
[Modify] Polish it
sta Jul 24, 2025
841edd4
[Modify] Polish it
sta Jul 24, 2025
a222f76
[Modify] Test it
sta Jul 25, 2025
3f9d014
[Modify] Add the CookiesResponder property
sta Jul 26, 2025
5e45b9f
[Modify] Replace it
sta Jul 27, 2025
20d4dcf
[Modify] Replace it
sta Jul 27, 2025
edba65e
[Modify] Polish it
sta Jul 27, 2025
a1e5a03
[Modify] Replace it
sta Jul 28, 2025
c454f58
[Modify] Return it
sta Jul 29, 2025
699181a
[Modify] Edit it
sta Jul 30, 2025
2add469
[Modify] Remove the CookiesValidator property
sta Jul 31, 2025
9d7637c
[Modify] Add it
sta Aug 1, 2025
e12518e
[Modify] Edit it
sta Aug 1, 2025
78cfefa
[Modify] Add it
sta Aug 2, 2025
5547ad0
[Modify] Use it
sta Aug 2, 2025
ae1c501
[Modify] Add it
sta Aug 2, 2025
18051fd
[Modify] Separate it
sta Aug 4, 2025
09d1058
[Modify] Edit it
sta Aug 5, 2025
6ee6687
[Modify] Edit it
sta Aug 6, 2025
1020f0e
[Modify] Edit it
sta Aug 7, 2025
c6a41cb
[Modify] Polish it
sta Aug 8, 2025
45d0695
[Modify] Polish it
sta Aug 9, 2025
1d51a67
[Modify] Polish it
sta Aug 10, 2025
2a719bc
[Modify] Polish it
sta Aug 11, 2025
4eb0522
[Modify] Add the HandshakeResponseCookies property
sta Aug 12, 2025
ebda304
[Modify] Polish it
sta Aug 13, 2025
35aa70e
[Modify] Polish it
sta Aug 14, 2025
eaaa552
[Modify] Replace it
sta Aug 14, 2025
f95ee8e
[Modify] Remove the Cookies property
sta Aug 15, 2025
bfe019c
[Modify] Rename it
sta Aug 16, 2025
773cd90
[Modify] Initialize it
sta Aug 17, 2025
546293a
[Modify] Add it
sta Aug 18, 2025
0c1d068
[Modify] Use it
sta Aug 19, 2025
2615365
[Modify] Add it
sta Aug 20, 2025
c56fc90
[Modify] Replace it
sta Aug 21, 2025
2ac4220
[Modify] Replace it
sta Aug 22, 2025
1e6e223
[Modify] Edit it
sta Aug 23, 2025
01a1a75
[Modify] Edit it
sta Aug 24, 2025
b7b87e6
[Modify] Polish it
sta Aug 25, 2025
ffb7ada
[Modify] Edit it
sta Aug 26, 2025
949df59
[Modify] Edit it
sta Aug 27, 2025
2e3c91a
[Modify] Edit it
sta Aug 28, 2025
4951838
[Modify] Edit it
sta Aug 29, 2025
e789ddc
[Modify] Edit it
sta Aug 30, 2025
36ea47e
[Modify] Polish it
sta Aug 31, 2025
e02174b
[Modify] Add it
sta Sep 1, 2025
4a997da
[Modify] Polish it
sta Sep 2, 2025
21c269c
[Modify] Rename it
sta Sep 3, 2025
1eaf1a6
[Modify] Rename it
sta Sep 4, 2025
bd8ae8c
[Modify] Polish it
sta Sep 5, 2025
0244121
[Modify] Rename it
sta Sep 6, 2025
3fc3253
[Modify] 2025
sta Sep 7, 2025
db1d7e9
[Modify] Add it
sta Sep 8, 2025
3959883
[Modify] Add it
sta Sep 9, 2025
f5174e7
[Modify] Replace it
sta Sep 10, 2025
064d473
[Modify] Remove it
sta Sep 11, 2025
be634d0
[Modify] Remove it
sta Sep 12, 2025
e344642
[Modify] Rename it
sta Sep 13, 2025
4219b77
[Modify] Test it
sta Sep 14, 2025
0de65f9
[Modify] Test it
sta Sep 15, 2025
4c92618
[Modify] Edit it
sta Sep 16, 2025
41cc733
[Modify] Edit it
sta Sep 17, 2025
e87081b
[Modify] Edit it
sta Sep 18, 2025
f4aacd4
[Modify] Edit it
sta Sep 19, 2025
4381688
[Modify] Polish it
sta Sep 20, 2025
01db844
[Modify] Replace it
sta Sep 21, 2025
7436c39
[Modify] Polish it
sta Sep 22, 2025
8185e2b
[Modify] Replace it
sta Sep 22, 2025
c54eb1d
[Modify] Polish it
sta Sep 23, 2025
7aa9131
[Modify] Replace it
sta Sep 23, 2025
7f40924
[Modify] Polish it
sta Sep 24, 2025
246b150
[Modify] Replace it
sta Sep 24, 2025
f02f719
[Modify] Polish it
sta Sep 25, 2025
50dea0d
[Modify] Replace it
sta Sep 25, 2025
2878f51
[Modify] Polish it
sta Sep 26, 2025
17821e7
[Modify] Replace it
sta Sep 26, 2025
3d22a20
[Modify] Polish it
sta Sep 27, 2025
90a70d4
[Modify] Replace it
sta Sep 27, 2025
cd538ef
[Modify] Polish it
sta Sep 28, 2025
e54349b
[Modify] Replace it
sta Sep 28, 2025
a8903fa
[Modify] Polish it
sta Sep 29, 2025
1b1b803
[Modify] Replace it
sta Sep 29, 2025
e50eea4
[Modify] Polish it
sta Sep 30, 2025
e075be0
[Modify] Replace it
sta Sep 30, 2025
d54d390
[Modify] Polish it
sta Oct 1, 2025
39b9566
[Modify] Replace it
sta Oct 1, 2025
36ee982
[Modify] Polish it
sta Oct 2, 2025
4c8a313
[Modify] Replace it
sta Oct 2, 2025
4ae8bae
[Modify] Polish it
sta Oct 3, 2025
9081927
[Modify] Replace it
sta Oct 3, 2025
a8051a6
[Modify] Polish it
sta Oct 4, 2025
716d53b
[Modify] Replace it
sta Oct 4, 2025
333fbcd
[Modify] Replace it
sta Oct 5, 2025
0ef3265
[Modify] Replace it
sta Oct 6, 2025
b951cb9
[Modify] Polish it
sta Oct 7, 2025
876cce2
[Modify] Replace it
sta Oct 7, 2025
e377a19
[Modify] Edit it
sta Oct 8, 2025
f11d22e
[Modify] Polish it
sta Oct 9, 2025
8c1c912
[Modify] Replace it
sta Oct 9, 2025
82fff99
[Modify] Edit it
sta Oct 10, 2025
5cc5d25
[Modify] Polish it
sta Oct 11, 2025
c322b9b
[Modify] Replace it
sta Oct 11, 2025
19665c0
[Modify] Edit it
sta Oct 12, 2025
76f4888
[Modify] Polish it
sta Oct 13, 2025
fd9a0f4
[Modify] Replace it
sta Oct 13, 2025
60cdb94
[Modify] Edit it
sta Oct 14, 2025
0da7d1b
[Modify] Polish it
sta Oct 15, 2025
55b9e31
[Modify] Replace it
sta Oct 15, 2025
ea94741
[Modify] Edit it
sta Oct 16, 2025
2f9458c
[Modify] Polish it
sta Oct 17, 2025
b88614a
[Modify] Replace it
sta Oct 17, 2025
9630074
[Modify] Edit it
sta Oct 18, 2025
e93b759
[Modify] Polish it
sta Oct 19, 2025
8454217
[Modify] Replace it
sta Oct 19, 2025
29773b2
[Modify] Edit it
sta Oct 20, 2025
b5278d4
[Modify] Polish it
sta Oct 21, 2025
7b7ba8e
[Modify] Replace it
sta Oct 21, 2025
155d277
[Modify] Edit it
sta Oct 22, 2025
01d4ac8
[Modify] Edit it
sta Oct 23, 2025
dde6bee
[Modify] Edit it
sta Oct 24, 2025
d143f28
[Modify] Edit it
sta Oct 25, 2025
820805d
[Modify] Edit it
sta Oct 25, 2025
eee95a8
[Modify] Polish it
sta Oct 26, 2025
874e86a
[Modify] Replace it
sta Oct 26, 2025
8d4cbf4
[Modify] Edit it
sta Oct 27, 2025
91647a4
[Modify] Polish it
sta Oct 28, 2025
3a5b8f0
[Modify] Replace it
sta Oct 28, 2025
502be02
[Modify] Edit it
sta Oct 29, 2025
5c7af57
[Modify] Polish it
sta Oct 30, 2025
f911d2a
[Modify] Replace it
sta Oct 30, 2025
8e08370
[Modify] Edit it
sta Oct 31, 2025
85f2b50
[Modify] Polish it
sta Nov 1, 2025
25bc618
[Modify] Replace it
sta Nov 1, 2025
b25d477
[Modify] Edit it
sta Nov 2, 2025
3a55501
[Modify] Polish it
sta Nov 3, 2025
0d65a3b
[Modify] Replace it
sta Nov 3, 2025
5008bf3
[Modify] Edit it
sta Nov 4, 2025
a99d6d2
[Modify] Polish it
sta Nov 5, 2025
ee6fa0d
[Modify] Replace it
sta Nov 5, 2025
59ff8f5
[Modify] Edit it
sta Nov 6, 2025
a0d86f2
[Modify] Polish it
sta Nov 7, 2025
994c757
[Modify] Replace it
sta Nov 7, 2025
4925566
[Modify] Edit it
sta Nov 8, 2025
95ff92f
[Modify] Polish it
sta Nov 9, 2025
415008a
[Modify] Replace it
sta Nov 9, 2025
705fbef
[Modify] Edit it
sta Nov 10, 2025
88b0f7a
[Modify] Polish it
sta Nov 11, 2025
e0282fc
[Modify] Replace it
sta Nov 11, 2025
e7ef819
[Modify] Edit it
sta Nov 12, 2025
8cea43d
[Modify] Polish it
sta Nov 13, 2025
9a93281
[Modify] Polish it
sta Nov 14, 2025
3e767d7
[Modify] Polish it
sta Nov 15, 2025
2e44ddd
[Modify] Polish it
sta Nov 16, 2025
7617604
[Modify] Polish it
sta Nov 17, 2025
df969e1
[Modify] Polish it
sta Nov 18, 2025
9ea275c
[Modify] Polish it
sta Nov 19, 2025
1035d80
[Modify] Polish it
sta Nov 20, 2025
eb7f7e4
[Modify] Polish it
sta Nov 21, 2025
8a8adfb
[Modify] Polish it
sta Nov 22, 2025
4df52ce
[Modify] Polish it
sta Nov 23, 2025
9cd96ad
[Modify] Polish it
sta Nov 24, 2025
b7fb22d
[Modify] Polish it
sta Nov 25, 2025
d689d45
[Modify] Replace it
sta Nov 26, 2025
68fa680
[Modify] Replace it
sta Nov 27, 2025
728eea6
[Modify] Polish it
sta Nov 28, 2025
bca6684
[Modify] Polish it
sta Nov 29, 2025
1ec485d
[Modify] Polish it
sta Nov 30, 2025
8840572
[Modify] Polish it
sta Dec 1, 2025
7fab8a9
[Modify] Polish it
sta Dec 1, 2025
b9e5f75
[Modify] Edit it
sta Dec 2, 2025
af302dc
[Modify] Edit it
sta Dec 2, 2025
8741341
[Modify] Polish it
sta Dec 3, 2025
cb452f0
[Modify] Polish it
sta Dec 3, 2025
e460e17
[Modify] Edit it
sta Dec 4, 2025
b266c8e
[Modify] Edit it
sta Dec 4, 2025
866b834
[Modify] Polish it
sta Dec 5, 2025
d9a8549
[Modify] Edit it
sta Dec 6, 2025
f634e09
[Modify] Polish it
sta Dec 7, 2025
d4545cd
[Modify] Edit it
sta Dec 8, 2025
bbc4a36
[Modify] Polish it
sta Dec 9, 2025
a791fa6
[Modify] Edit it
sta Dec 10, 2025
180d404
[Modify] Polish it
sta Dec 11, 2025
fecfaa5
[Modify] Edit it
sta Dec 12, 2025
f4e6868
[Modify] Polish it
sta Dec 13, 2025
d7f95dd
[Modify] Edit it
sta Dec 14, 2025
9f97067
[Modify] Polish it
sta Dec 15, 2025
fe0881c
[Modify] Edit it
sta Dec 16, 2025
d151eae
[Modify] Polish it
sta Dec 17, 2025
2c07dcf
[Modify] Edit it
sta Dec 18, 2025
8cff8a5
[Modify] Polish it
sta Dec 19, 2025
339dd1b
[Modify] Edit it
sta Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Example/Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug_Ubuntu</OutputPath>
<DefineConstants>DEBUG,UBUNTU</DefineConstants>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
Expand All @@ -43,16 +43,12 @@
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release_Ubuntu</OutputPath>
<DefineConstants>UBUNTU</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="notify-sharp, Version=0.4.0.0, Culture=neutral, PublicKeyToken=2df29c54e245917a">
<Package>notify-sharp</Package>
</Reference>
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
Expand All @@ -65,7 +61,5 @@
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Notifier.cs" />
<Compile Include="NotificationMessage.cs" />
</ItemGroup>
</Project>
24 changes: 0 additions & 24 deletions Example/NotificationMessage.cs

This file was deleted.

81 changes: 0 additions & 81 deletions Example/Notifier.cs

This file was deleted.

141 changes: 81 additions & 60 deletions Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,104 +18,125 @@ public static void Main (string[] args)
// If you would like to connect to the server with the secure connection,
// you should create a new instance with a wss scheme WebSocket URL.

using (var nf = new Notifier ())
using (var ws = new WebSocket ("ws://echo.websocket.org"))
//using (var ws = new WebSocket ("wss://echo.websocket.org"))
//using (var ws = new WebSocket ("ws://localhost:4649/Echo"))
//using (var ws = new WebSocket ("wss://localhost:5963/Echo"))
//using (var ws = new WebSocket ("ws://localhost:4649/Echo?name=nobita"))
//using (var ws = new WebSocket ("wss://localhost:5963/Echo?name=nobita"))
//using (var ws = new WebSocket ("ws://localhost:4649/Chat"))
using (var ws = new WebSocket ("ws://localhost:4649/Chat"))
//using (var ws = new WebSocket ("wss://localhost:5963/Chat"))
//using (var ws = new WebSocket ("ws://localhost:4649/Chat?name=nobita"))
//using (var ws = new WebSocket ("wss://localhost:5963/Chat?name=nobita"))
{
// Set the WebSocket events.

ws.OnOpen += (sender, e) => ws.Send ("Hi, there!");

ws.OnMessage += (sender, e) =>
nf.Notify (
new NotificationMessage {
Summary = "WebSocket Message",
Body = !e.IsPing ? e.Data : "Received a ping.",
Icon = "notification-message-im"
}
);

ws.OnError += (sender, e) =>
nf.Notify (
new NotificationMessage {
Summary = "WebSocket Error",
Body = e.Message,
Icon = "notification-message-im"
}
);

ws.OnClose += (sender, e) =>
nf.Notify (
new NotificationMessage {
Summary = String.Format ("WebSocket Close ({0})", e.Code),
Body = e.Reason,
Icon = "notification-message-im"
}
);
#if DEBUG
// To change the logging level.
ws.Log.Level = LogLevel.Trace;

// To change the wait time for the response to the Ping or Close.
//ws.WaitTime = TimeSpan.FromSeconds (10);
// To enable the Per-message Compression extension.
//ws.Compression = CompressionMethod.Deflate;

// To emit a WebSocket.OnMessage event when receives a ping.
//ws.EmitOnPing = true;
#endif
// To enable the Per-message Compression extension.
//ws.Compression = CompressionMethod.Deflate;

// To enable the redirection.
//ws.EnableRedirection = true;

// To disable a delay when send or receive buffer of the underlying
// TCP socket is not full.
ws.NoDelay = true;

// To send the Origin header.
//ws.Origin = "http://localhost:4649";

// To send the cookies.
//ws.SetCookie (new Cookie ("name", "nobita"));
//ws.SetCookie (new Cookie ("roles", "\"idiot, gunfighter\""));

// To send the credentials for the HTTP Authentication (Basic/Digest).
//ws.SetCredentials ("nobita", "password", false);

// To connect through the HTTP Proxy server.
//ws.SetProxy ("http://localhost:3128", "nobita", "password");

// To send a user header.

var reqHeader = "RequestForID";
var resHeader = "ID";

ws.SetUserHeader (reqHeader, resHeader);


// To validate the server certificate.
/*
ws.SslConfiguration.ServerCertificateValidationCallback =
(sender, certificate, chain, sslPolicyErrors) => {
ws.Log.Debug (
String.Format (
"Certificate:\n- Issuer: {0}\n- Subject: {1}",
certificate.Issuer,
certificate.Subject
)
);
var fmt = "Certificate:\n- Issuer: {0}\n- Subject: {1}";
var msg = String.Format (
fmt,
certificate.Issuer,
certificate.Subject
);

ws.Log.Debug (msg);

return true; // If the server certificate is valid.
};
*/

// To send the credentials for the HTTP Authentication (Basic/Digest).
//ws.SetCredentials ("nobita", "password", false);
// To change the wait time for the response to the Ping or Close.
//ws.WaitTime = TimeSpan.FromSeconds (10);
#endif
// Set the WebSocket events.

// To send the Origin header.
//ws.Origin = "http://localhost:4649";
ws.OnClose +=
(sender, e) => {
var fmt = "[WebSocket Close ({0})] {1}";

// To send the cookies.
//ws.SetCookie (new Cookie ("name", "nobita"));
//ws.SetCookie (new Cookie ("roles", "\"idiot, gunfighter\""));
Console.WriteLine (fmt, e.Code, e.Reason);
};

// To connect through the HTTP Proxy server.
//ws.SetProxy ("http://localhost:3128", "nobita", "password");
ws.OnError +=
(sender, e) => {
var fmt = "[WebSocket Error] {0}";

// To enable the redirection.
//ws.EnableRedirection = true;
Console.WriteLine (fmt, e.Message);
};

ws.OnMessage +=
(sender, e) => {
var fmt = e.IsPing
? "[WebSocket Ping] {0}"
: "[WebSocket Message] {0}";

Console.WriteLine (fmt, e.Data);
};

ws.OnOpen +=
(sender, e) => {
#if DEBUG
var val = ws.HandshakeResponseHeaders[resHeader];

if (!val.IsNullOrEmpty ()) {
var fmt = "[WebSocket Open] {0}: {1}";

Console.WriteLine (fmt, resHeader, val);
}
#endif
ws.Send ("Hi, there!");
};

// Connect to the server.
ws.Connect ();

// Connect to the server asynchronously.
//ws.ConnectAsync ();

Console.WriteLine ("\nType 'exit' to exit.\n");
Console.WriteLine ("\nType \"exit\" to exit.\n");

while (true) {
Thread.Sleep (1000);

Console.Write ("> ");

var msg = Console.ReadLine ();

if (msg == "exit")
break;

Expand Down
26 changes: 0 additions & 26 deletions Example1/AssemblyInfo.cs

This file was deleted.

Loading