Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3699 commits
Select commit Hold shift + click to select a range
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
d4a8497
[Modify] Polish it
sta Dec 21, 2025
2318b69
[Modify] Edit it
sta Dec 22, 2025
c8d374c
[Modify] Polish it
sta Dec 23, 2025
2b0a789
[Modify] Polish it
sta Dec 23, 2025
c44f3c1
[Modify] Edit it
sta Dec 24, 2025
4f9ae3d
[Modify] Edit it
sta Dec 24, 2025
ad84ea5
[Modify] Edit it
sta Dec 25, 2025
340b863
[Modify] Edit it
sta Dec 26, 2025
192b50b
[Modify] Polish it
sta Dec 27, 2025
1340fcc
[Modify] Polish it
sta Dec 27, 2025
29dc966
[Modify] Edit it
sta Dec 28, 2025
dee5303
[Modify] Edit it
sta Dec 28, 2025
af6a349
[Modify] Edit it
sta Dec 29, 2025
0531168
[Modify] Polish it
sta Dec 30, 2025
1a30262
[Modify] Edit it
sta Dec 31, 2025
3dabbb0
[Modify] Edit it
sta Jan 1, 2026
5015110
[Modify] 2026
sta Jan 1, 2026
db78218
[Modify] Rename it
sta Jan 2, 2026
4d4cd0b
[Modify] Polish it
sta Jan 3, 2026
63fc7fd
[Modify] Rename it
sta Jan 4, 2026
0a926e8
[Modify] Polish it
sta Jan 5, 2026
142d691
[Modify] Polish it
sta Jan 6, 2026
25b0fc6
[Modify] Polish it
sta Jan 6, 2026
7143965
[Modify] Polish it
sta Jan 7, 2026
09f4496
[Modify] Rename it
sta Jan 8, 2026
e51470a
[Modify] Polish it
sta Jan 9, 2026
0b66ea6
[Modify] 2026
sta Jan 10, 2026
fda0082
[Modify] Edit it
sta Jan 11, 2026
b9ca55f
[Modify] Polish it
sta Jan 12, 2026
bf20bcb
[Modify] Edit it
sta Jan 13, 2026
474c280
[Modify] Edit it
sta Jan 14, 2026
3c9b454
[Modify] Edit it
sta Jan 15, 2026
8329250
[Modify] Edit it
sta Jan 16, 2026
07ad07f
[Modify] Edit it
sta Jan 17, 2026
e1a57ca
[Modify] Edit it
sta Jan 18, 2026
4c81537
[Modify] Edit it
sta Jan 19, 2026
415b82f
[Modify] Edit it
sta Jan 20, 2026
32bd0fb
[Modify] Edit it
sta Jan 21, 2026
5242096
[Modify] Edit it
sta Jan 22, 2026
8b5bded
[Modify] Edit it
sta Jan 23, 2026
d158dd2
[Modify] Edit it
sta Jan 24, 2026
673dbdc
[Modify] Polish it
sta Jan 25, 2026
06c8bb8
[Modify] Edit it
sta Jan 26, 2026
2a977b8
[Modify] Edit it
sta Jan 27, 2026
6aa9318
[Modify] Polish it
sta Jan 28, 2026
f6f96fe
[Modify] Polish it
sta Jan 28, 2026
ac0d542
[Modify] Polish it
sta Jan 29, 2026
366c23b
[Modify] Polish it
sta Jan 29, 2026
e9c92e9
[Modify] Polish it
sta Jan 30, 2026
304cc77
[Modify] Polish it
sta Jan 31, 2026
2431285
[Modify] Edit it
sta Feb 1, 2026
9be8ebe
[Modify] Polish it
sta Feb 2, 2026
e7d22c9
[Modify] Edit it
sta Feb 3, 2026
1e7cd26
[Modify] Polish it
sta Feb 4, 2026
9e7a5a7
[Modify] Polish it
sta Feb 5, 2026
9bceaef
[Modify] Edit it
sta Feb 6, 2026
0a0c7e7
[Modify] Polish it
sta Feb 7, 2026
deacb34
[Modify] Polish it
sta Feb 8, 2026
0293525
[Modify] Edit it
sta Feb 9, 2026
33fd1d5
[Modify] Polish it
sta Feb 10, 2026
efdb352
[Modify] Edit it
sta Feb 11, 2026
dfd73cb
[Modify] Polish it
sta Feb 12, 2026
300c273
[Modify] Polish it
sta Feb 13, 2026
8763e49
[Modify] Polish it
sta Feb 14, 2026
12277ed
[Modify] Edit it
sta Feb 15, 2026
d92871b
[Modify] Polish it
sta Feb 16, 2026
2375e88
[Modify] Edit it
sta Feb 17, 2026
2e3503c
[Modify] Polish it
sta Feb 18, 2026
515d1a2
[Modify] Polish it
sta Feb 19, 2026
6f5ad6f
[Modify] Edit it
sta Feb 20, 2026
e5b2f5c
[Modify] Edit it
sta Feb 21, 2026
63c4974
[Modify] Edit it
sta Feb 22, 2026
a8ef13c
[Modify] Edit it
sta Feb 23, 2026
8ed4f93
[Modify] Edit it
sta Feb 24, 2026
0e1a738
[Modify] Edit it
sta Feb 25, 2026
1caba11
[Modify] Edit it
sta Feb 26, 2026
d35f075
[Modify] Edit it
sta Feb 26, 2026
03c623a
[Modify] Edit it
sta Feb 27, 2026
a395286
[Modify] Edit it
sta Feb 28, 2026
39ecc2e
[Modify] Edit it
sta Mar 1, 2026
58e4bca
[Modify] Edit it
sta Mar 2, 2026
afc0daa
[Modify] Edit it
sta Mar 2, 2026
e0c0aa5
[Modify] Edit it
sta Mar 3, 2026
80a613f
[Modify] Edit it
sta Mar 3, 2026
ed91ea6
[Modify] Edit it
sta Mar 4, 2026
0ec6e65
[Modify] Edit it
sta Mar 4, 2026
1b2fdf3
[Modify] Edit it
sta Mar 5, 2026
6b6555a
[Modify] Edit it
sta Mar 6, 2026
4c1fd91
[Modify] 2026
sta Mar 7, 2026
042094c
[Modify] Edit it
sta Mar 8, 2026
e0a41eb
[Modify] Edit it
sta Mar 9, 2026
6e74e4c
[Modify] Edit it
sta Mar 9, 2026
59a76de
[Modify] Edit it
sta Mar 10, 2026
0ec765c
[Modify] Edit it
sta Mar 11, 2026
b444666
[Modify] Edit it
sta Mar 11, 2026
cd333f8
[Modify] Edit it
sta Mar 12, 2026
78eb9f4
[Modify] Edit it
sta Mar 12, 2026
eb35551
[Modify] Edit it
sta Mar 13, 2026
5dc3e29
[Modify] Edit it
sta Mar 14, 2026
9cc121b
[Modify] Edit it
sta Mar 15, 2026
c6c0c97
[Modify] Edit it
sta Mar 16, 2026
f6e2ca1
[Modify] Edit it
sta Mar 16, 2026
1ef8f01
[Modify] Edit it
sta Mar 17, 2026
62d506c
[Modify] Edit it
sta Mar 17, 2026
a3094d5
[Modify] Edit it
sta Mar 17, 2026
0104c5f
[Modify] Edit it
sta Mar 18, 2026
0544db3
[Modify] Edit it
sta Mar 19, 2026
ff54682
[Modify] Edit it
sta Mar 19, 2026
516d8d4
[Modify] Edit it
sta Mar 20, 2026
936ef58
[Modify] Edit it
sta Mar 21, 2026
de9a33c
[Modify] Edit it
sta Mar 22, 2026
5bd51b5
[Modify] Edit it
sta Mar 23, 2026
788a59c
[Modify] Edit it
sta Mar 24, 2026
67cf56c
[Modify] Edit it
sta Mar 25, 2026
df1ca2e
[Modify] Edit it
sta Mar 26, 2026
e692a5f
[Modify] Edit it
sta Mar 27, 2026
0d6f6a0
[Modify] Edit it
sta Mar 28, 2026
9ef4608
[Modify] Edit it
sta Mar 29, 2026
2da8123
[Modify] Edit it
sta Mar 30, 2026
7c1688c
[Modify] Edit it
sta Mar 31, 2026
59baa5d
[Modify] Edit it
sta Apr 1, 2026
2e0f552
[Modify] Edit it
sta Apr 2, 2026
bdbeb5d
[Modify] Edit it
sta Apr 3, 2026
370c15e
[Modify] Edit it
sta Apr 4, 2026
6e226ab
[Modify] Edit it
sta Apr 5, 2026
6a614cd
[Modify] Edit it
sta Apr 6, 2026
c3a6c06
[Modify] Edit it
sta Apr 7, 2026
92fa4c5
[Modify] Edit it
sta Apr 8, 2026
e378533
[Modify] Edit it
sta Apr 9, 2026
8ed0b92
[Modify] Edit it
sta Apr 10, 2026
fc8c891
[Modify] Add it
sta Apr 11, 2026
ce1ec51
[Modify] Add it
sta Apr 12, 2026
44be35f
[Modify] Use it
sta Apr 13, 2026
bb1c2c7
[Modify] Add it
sta Apr 14, 2026
db9282f
[Modify] Add it
sta Apr 15, 2026
6f10baa
[Modify] Use it
sta Apr 16, 2026
e774ef7
[Modify] Polish it
sta Apr 17, 2026
75cf16e
[Modify] 2026
sta Apr 18, 2026
a028a5a
[Modify] 2026
sta Apr 19, 2026
8d2404d
[Modify] Edit it
sta Apr 20, 2026
b7841f4
[Modify] Edit it
sta Apr 21, 2026
8b1a8e6
[Modify] Edit it
sta Apr 22, 2026
ed7a14c
[Modify] Edit it
sta Apr 23, 2026
8de0ab3
[Modify] Edit it
sta Apr 24, 2026
9e45742
[Modify] Edit it
sta Apr 25, 2026
69dc5aa
[Modify] Edit it
sta Apr 26, 2026
3fb1b86
[Modify] Edit it
sta Apr 27, 2026
67982ed
[Modify] Edit it
sta Apr 28, 2026
95cf290
[Modify] Edit it
sta Apr 29, 2026
a02b6ad
[Modify] Edit it
sta Apr 30, 2026
1470c85
[Modify] Edit it
sta May 1, 2026
ebbd104
[Modify] Edit it
sta May 2, 2026
eb29ae6
[Modify] Edit it
sta May 3, 2026
aa8b5d3
[Modify] Edit it
sta May 4, 2026
6aa2c62
[Modify] Edit it
sta May 5, 2026
d320f25
[Modify] Edit it
sta May 6, 2026
d53ccbb
[Modify] Edit it
sta May 7, 2026
3173373
[Modify] Edit it
sta May 8, 2026
359b331
[Modify] Edit it
sta May 9, 2026
d01d2b0
[Modify] Edit it
sta May 10, 2026
e9e23d7
[Modify] Edit it
sta May 11, 2026
a369c3f
[Modify] Edit it
sta May 12, 2026
dd1807d
[Modify] Edit it
sta May 13, 2026
51a3b40
[Modify] Edit it
sta May 14, 2026
69b85e9
[Modify] Edit it
sta May 15, 2026
f7fca76
[Modify] Edit it
sta May 16, 2026
10d786b
[Modify] Edit it
sta May 17, 2026
3cf7365
[Modify] Edit it
sta May 18, 2026
2c0d5fb
[Modify] Edit it
sta May 19, 2026
af8f25a
[Modify] Edit it
sta May 20, 2026
97c044b
[Modify] Edit it
sta May 21, 2026
1a4353f
[Modify] Edit it
sta May 22, 2026
965f857
[Modify] Edit it
sta May 23, 2026
3e4150c
[Modify] Edit it
sta May 24, 2026
b482710
[Modify] Edit it
sta May 25, 2026
243ae26
[Modify] Edit it
sta May 26, 2026
d90118c
[Modify] Edit it
sta May 27, 2026
476b5ff
[Modify] Edit it
sta May 28, 2026
9645612
[Modify] Edit it
sta May 29, 2026
ebf0343
[Modify] Edit it
sta May 30, 2026
878c6b4
[Modify] Edit it
sta May 31, 2026
8d06da2
[Modify] Edit it
sta Jun 1, 2026
17864d8
[Modify] Edit it
sta Jun 2, 2026
40f186d
[Modify] Edit it
sta Jun 3, 2026
1a9deb1
[Modify] Throw it
sta Jun 4, 2026
3ddf397
[Modify] Edit it
sta Jun 5, 2026
e02eecb
[Modify] Throw it
sta Jun 6, 2026
e57e908
[Modify] Edit it
sta Jun 7, 2026
1bef8d4
[Modify] Edit it
sta Jun 8, 2026
e1fa908
[Modify] Edit it
sta Jun 9, 2026
6a9cb07
[Modify] 2026
sta Jun 10, 2026
5007c52
[Modify] Throw it
sta Jun 11, 2026
28d2e8d
[Modify] Edit it
sta Jun 12, 2026
c2123b8
[Modify] Throw it
sta Jun 13, 2026
1201f7c
[Modify] Edit it
sta Jun 14, 2026
199fd2f
[Modify] Edit it
sta Jun 15, 2026
2d1564c
[Modify] Edit it
sta Jun 16, 2026
1ddd7c4
[Modify] Edit it
sta Jun 17, 2026
7085392
[Modify] Edit it
sta Jun 18, 2026
90fc75d
[Modify] Replace it
sta Jun 19, 2026
ec165cd
[Modify] Replace it
sta Jun 20, 2026
4270406
[Modify] Remove it
sta Jun 21, 2026
6bdb550
[Modify] Replace it
sta Jun 22, 2026
031057f
[Modify] Replace it
sta Jun 23, 2026
ff616da
[Modify] Remove it
sta Jun 24, 2026
44d5b4f
[Modify] 2026
sta Jun 25, 2026
d55755d
[Modify] 2026
sta Jun 26, 2026
bf70f56
[Modify] Rename it
sta Jun 27, 2026
6b3e023
[Modify] Polish it
sta Jun 28, 2026
d221510
[Modify] Edit it
sta Jun 29, 2026
c59ab97
[Modify] Edit it
sta Jun 30, 2026
50bca7a
[Modify] Edit it
sta Jul 1, 2026
a5029e2
[Modify] Edit it
sta Jul 2, 2026
c8a7b35
[Modify] Edit it
sta Jul 3, 2026
bf8ad35
[Modify] Edit it
sta Jul 4, 2026
11c7962
[Modify] Edit it
sta Jul 5, 2026
213dfe1
[Modify] Edit it
sta Jul 6, 2026
e49a098
[Modify] Edit it
sta Jul 7, 2026
fd014be
[Modify] Edit it
sta Jul 8, 2026
16ce6fa
[Modify] Edit it
sta Jul 9, 2026
21e270d
[Modify] Edit it
sta Jul 11, 2026
742d940
[Modify] Edit it
sta Jul 12, 2026
a731a79
[Modify] Edit it
sta Jul 13, 2026
64f812a
[Modify] Edit it
sta Jul 14, 2026
af7213d
[Modify] Edit it
sta Jul 15, 2026
0bdd5c9
[Modify] Edit it
sta Jul 16, 2026
8b59760
[Modify] Edit it
sta Jul 17, 2026
b8c8b00
[Modify] Edit it
sta Jul 18, 2026
30547dc
[Modify] Edit it
sta Jul 19, 2026
a80255c
[Modify] Edit it
sta Jul 20, 2026
cfb5c9b
[Modify] Edit it
sta Jul 21, 2026
99aa405
[Modify] Polish it
sta Jul 22, 2026
e12ebef
[Modify] Rename it
sta Jul 23, 2026
9bd9022
[Modify] Polish it
sta Jul 24, 2026
cc8c077
[Modify] Edit it
sta Jul 25, 2026
6e47a1e
[Modify] Polish it
sta Jul 26, 2026
89e10f5
[Modify] Edit it
sta Jul 27, 2026
f72999f
[Modify] Edit it
sta Jul 28, 2026
87ea817
[Modify] Edit it
sta Jul 29, 2026
92472df
[Modify] Polish it
sta Jul 30, 2026
9261a6e
[Modify] Move it
sta Jul 31, 2026
ac9209e
[Modify] Log it
sta Aug 1, 2026
2c56249
[Modify] Throw it
sta Aug 2, 2026
7aed000
[Modify] Edit it
sta Aug 3, 2026
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