Skip to content

Merge original #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3,240 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3240 commits
Select commit Hold shift + click to select a range
1fc1c6e
[Modify] 2024
sta Dec 31, 2024
0cbd542
[Modify] 2025!
sta Jan 1, 2025
4776fe5
[Modify] Replace it
sta Jan 2, 2025
34880ff
[Modify] Polish it
sta Jan 2, 2025
f676e24
[Modify] Polish it
sta Jan 3, 2025
d430142
[Modify] 2025
sta Jan 4, 2025
fbe8fe7
[Modify] Rename it
sta Jan 5, 2025
8ab24d8
[Modify] Polish it
sta Jan 6, 2025
a501342
[Modify] 2025
sta Jan 7, 2025
ca5b789
[Modify] Edit it
sta Jan 8, 2025
ff2309d
[Modify] 2025
sta Jan 9, 2025
1e46b0d
[Modify] Use default type (int)
sta Jan 10, 2025
cb66fc4
[Modify] 2025
sta Jan 11, 2025
341d307
[Modify] 2025
sta Jan 12, 2025
07a7186
[Modify] 2025
sta Jan 13, 2025
dbe1c13
[Modify] Use int
sta Jan 14, 2025
42865f4
[Modify] Polish it
sta Jan 15, 2025
4755851
[Modify] Polish it
sta Jan 16, 2025
813ccb1
[Modify] 2025
sta Jan 17, 2025
cd1061b
[Modify] Replace it
sta Jan 18, 2025
3e2e502
[Modify] Polish it
sta Jan 19, 2025
7a4ea6d
[Modify] 2025
sta Jan 20, 2025
aa809ed
[Modify] Add it
sta Jan 21, 2025
9c7abc3
[Modify] 2025
sta Jan 22, 2025
5347727
[Modify] Add a check if it is defined
sta Jan 23, 2025
24fd07d
[Modify] Polish it
sta Jan 24, 2025
a5e6903
[Modify] Polish it
sta Jan 25, 2025
7f55ed3
[Modify] Edit it
sta Jan 26, 2025
3fa0134
[Modify] Add a check if it is defined
sta Jan 27, 2025
485cd30
[Modify] Polish it
sta Jan 28, 2025
65cf8ef
[Modify] Edit it
sta Jan 29, 2025
82e831f
[Modify] Edit it
sta Jan 30, 2025
57831be
[Modify] Edit it
sta Jan 31, 2025
6fe8e6b
[Modify] 2025
sta Feb 1, 2025
0bb5269
[Modify] Edit it
sta Feb 2, 2025
77e4265
[Modify] Edit it
sta Feb 3, 2025
64c52db
[Modify] Edit it
sta Feb 4, 2025
e82c025
[Modify] Polish it
sta Feb 5, 2025
c5f637c
[Modify] Edit it
sta Feb 6, 2025
ee958d9
[Modify] Edit it
sta Feb 7, 2025
ac87dfb
[Modify] Edit it
sta Feb 8, 2025
6f7e1c5
[Modify] Edit it
sta Feb 9, 2025
38b76cc
[Modify] Polish it
sta Feb 10, 2025
91019be
[Modify] Edit it
sta Feb 11, 2025
a980b1d
[Modify] Edit it
sta Feb 12, 2025
07a7939
[Modify] Edit it
sta Feb 13, 2025
9b04c89
[Modify] Edit it
sta Feb 14, 2025
b34c2d3
[Modify] Edit it
sta Feb 15, 2025
52990ca
[Modify] Edit it
sta Feb 16, 2025
5a404b7
[Modify] Edit it
sta Feb 17, 2025
70d1c1d
[Modify] Edit it
sta Feb 18, 2025
da8de18
[Modify] 2025
sta Feb 19, 2025
0ea5a51
[Modify] Edit it
sta Feb 20, 2025
8809cef
[Modify] Rename it
sta Feb 21, 2025
9534bc0
[Modify] Polish it
sta Feb 22, 2025
af946b0
[Modify] Polish it
sta Feb 23, 2025
6ebf58c
[Modify] Polish it
sta Feb 24, 2025
fb16d10
[Modify] Polish it
sta Feb 25, 2025
762eca4
[Modify] Rename it
sta Feb 26, 2025
e0642f6
[Modify] Polish it
sta Feb 27, 2025
f558f7f
[Modify] Add it
sta Feb 28, 2025
918250e
[Modify] Add it
sta Mar 1, 2025
d9a54e1
[Modify] 2025
sta Mar 2, 2025
317bd43
[Modify] Add it
sta Mar 3, 2025
1c858cf
[Modify] Polish it
sta Mar 4, 2025
a8b1db0
[Modify] Polish it
sta Mar 5, 2025
555ab68
[Modify] Polish it
sta Mar 6, 2025
2b191f4
[Modify] Polish it
sta Mar 7, 2025
383daa6
[Modify] Rename it
sta Mar 8, 2025
7f6367b
[Modify] Polish it
sta Mar 9, 2025
b9e4f7b
[Modify] 2025
sta Mar 10, 2025
0030e5d
[Modify] Add it
sta Mar 11, 2025
e7e0f89
[Modify] Add the NoDelay property
sta Mar 12, 2025
1968368
[Modify] Add it
sta Mar 13, 2025
8a54736
[Modify] Replace it
sta Mar 14, 2025
fe316dc
[Modify] Replace it
sta Mar 15, 2025
132e378
[Modify] Replace it
sta Mar 16, 2025
939faa2
[Modify] Polish it
sta Mar 17, 2025
0fcb570
[Modify] Polish it
sta Mar 18, 2025
ca6c75a
[Modify] Add the NoDelay property
sta Mar 19, 2025
8c80be5
[Modify] Add it
sta Mar 20, 2025
1b58fcd
[Modify] Add it
sta Mar 21, 2025
3e0ddb6
[Modify] Add it
sta Mar 22, 2025
b4b1099
[Modify] Polish it
sta Mar 23, 2025
9b1974e
[Modify] Edit it
sta Mar 23, 2025
607835d
[Modify] Polish it
sta Mar 24, 2025
34486fa
[Modify] Throw an exception
sta Mar 24, 2025
2d3f5ff
[Modify] Polish it
sta Mar 25, 2025
689f9b7
[Modify] Throw an exception
sta Mar 25, 2025
45458f6
[Modify] Polish it
sta Mar 25, 2025
bf6fa13
[Modify] Polish it
sta Mar 26, 2025
bbc2c72
[Modify] Edit it
sta Mar 27, 2025
bd13ca3
[Modify] Polish it
sta Mar 27, 2025
8ee8c19
[Modify] Edit it
sta Mar 27, 2025
4f5f6fb
[Modify] Polish it
sta Mar 28, 2025
a807fa6
[Modify] Edit it
sta Mar 28, 2025
2fe3885
[Modify] Polish it
sta Mar 29, 2025
341c710
[Modify] Edit it
sta Mar 29, 2025
556e6da
[Modify] Polish it
sta Mar 30, 2025
563ca02
Revert "[Modify] Polish it"
sta Mar 30, 2025
2dc9317
[Modify] Polish it
sta Mar 30, 2025
8531404
[Modify] Edit it
sta Mar 30, 2025
9c19583
[Modify] Polish it
sta Mar 31, 2025
1a66843
[Modify] Edit it
sta Mar 31, 2025
9696770
[Modify] Polish it
sta Apr 1, 2025
3953314
[Modify] Edit it
sta Apr 1, 2025
fc11bad
[Modify] Polish it
sta Apr 2, 2025
ee17207
[Modify] Edit it
sta Apr 2, 2025
38ffe9b
[Modify] Throw an exception
sta Apr 3, 2025
c02875e
[Modify] Edit it
sta Apr 4, 2025
b972bcb
[Modify] Throw an exception
sta Apr 4, 2025
16fc3ec
[Modify] Throw an exception
sta Apr 5, 2025
e7a4bbb
[Modify] Polish it
sta Apr 6, 2025
2d493f3
[Modify] Edit it
sta Apr 6, 2025
3b44a32
[Modify] Edit it
sta Apr 6, 2025
b40bad1
[Modify] Polish it
sta Apr 7, 2025
9ce8e9b
[Modify] Edit it
sta Apr 7, 2025
f9c1d61
[Modify] Polish it
sta Apr 8, 2025
56fe390
[Modify] Edit it
sta Apr 8, 2025
d11e8a8
[Modify] Polish it
sta Apr 9, 2025
724629c
[Modify] Edit it
sta Apr 9, 2025
d6a463c
[Modify] Polish it
sta Apr 10, 2025
3d5e550
[Modify] Edit it
sta Apr 10, 2025
9bf2c89
[Modify] Polish it
sta Apr 11, 2025
a4d3599
[Modify] Edit it
sta Apr 11, 2025
cb7c232
[Modify] Polish it
sta Apr 11, 2025
35b7be4
[Modify] Polish it
sta Apr 12, 2025
5e7f403
[Modify] Edit it
sta Apr 12, 2025
c38bafc
[Modify] Polish it
sta Apr 13, 2025
1358144
[Modify] Edit it
sta Apr 13, 2025
b68723a
[Modify] Polish it
sta Apr 13, 2025
9b13f73
[Modify] Edit it
sta Apr 13, 2025
3c6cff1
[Modify] Polish it
sta Apr 14, 2025
f7e4d48
[Modify] Edit it
sta Apr 14, 2025
570bd02
[Modify] Edit it
sta Apr 15, 2025
038e52d
[Modify] Edit it
sta Apr 15, 2025
09694d0
[Modify] Edit it
sta Apr 15, 2025
a3ca7eb
[Modify] Polish it
sta Apr 15, 2025
9de8a04
[Modify] Edit it
sta Apr 15, 2025
8f81a4d
[Modify] Polish it
sta Apr 16, 2025
6a02688
[Modify] Edit it
sta Apr 16, 2025
a4707fd
[Modify] Polish it
sta Apr 17, 2025
b8c6e48
[Modify] Edit it
sta Apr 17, 2025
3392adf
[Modify] Polish it
sta Apr 18, 2025
adb8b45
[Modify] Edit it
sta Apr 18, 2025
46f79cc
[Modify] Polish it
sta Apr 19, 2025
d92f66b
[Modify] Edit it
sta Apr 19, 2025
15f4279
[Modify] Polish it
sta Apr 20, 2025
47e7293
[Modify] Edit it
sta Apr 20, 2025
9a68fdd
[Modify] Edit it
sta Apr 21, 2025
46f7edc
[Modify] Edit it
sta Apr 21, 2025
0ce7189
[Modify] Edit it
sta Apr 21, 2025
7343a62
[Modify] Polish it
sta Apr 22, 2025
122d1a2
[Modify] Polish it
sta Apr 23, 2025
4978ebc
[Modify] Polish it
sta Apr 23, 2025
eb1ad9e
[Modify] Polish it
sta Apr 24, 2025
a2a8d48
[Modify] Polish it
sta Apr 24, 2025
eaa3d9a
[Modify] Polish it
sta Apr 25, 2025
5bd4191
[Modify] Polish it
sta Apr 25, 2025
2962787
[Modify] Polish it
sta Apr 26, 2025
ab59790
[Modify] Polish it
sta Apr 27, 2025
da2c1aa
[Modify] Edit it
sta Apr 27, 2025
231e9f3
[Modify] Polish it
sta Apr 27, 2025
9a1cae9
[Modify] Polish it
sta Apr 28, 2025
edaaadc
[Modify] Polish it
sta Apr 28, 2025
0a67662
[Modify] Polish it
sta Apr 29, 2025
69797cb
[Modify] Polish it
sta Apr 30, 2025
b7a1b35
[Modify] Polish it
sta May 1, 2025
7c4c2bd
[Modify] Edit it
sta May 2, 2025
6203782
[Modify] Polish it
sta May 2, 2025
8412a1e
[Modify] Polish it
sta May 3, 2025
2d746ab
[Modify] Polish it
sta May 4, 2025
c204b82
[Modify] Throw an exception
sta May 5, 2025
8469533
[Modify] Throw an exception
sta May 6, 2025
5670918
[Modify] Edit it
sta May 6, 2025
a8faebf
[Modify] Polish it
sta May 7, 2025
34199b5
[Modify] Throw an exception
sta May 8, 2025
b85e781
[Modify] Throw an exception
sta May 9, 2025
aa0302c
[Modify] Throw an exception
sta May 10, 2025
6e494c2
[Modify] Edit it
sta May 11, 2025
633e6ef
[Modify] Polish it
sta May 12, 2025
34f9ba1
[Modify] Throw an exception
sta May 13, 2025
8f9b5bc
[Modify] Do not throw it
sta May 14, 2025
b54937e
[Modify] Throw an exception
sta May 15, 2025
b26c4e9
[Modify] Polish it
sta May 16, 2025
a1c685d
[Modify] Throw an exception
sta May 17, 2025
5bcde41
[Modify] Polish it
sta May 18, 2025
8ecf258
[Modify] Polish it
sta May 19, 2025
6d90d14
[Modify] Throw an exception
sta May 20, 2025
319fe53
[Modify] Throw an exception
sta May 21, 2025
e9e0d15
[Modify] Edit it
sta May 22, 2025
f7eb337
[Modify] Edit it
sta May 23, 2025
3daf3f7
[Modify] Polish it
sta May 24, 2025
398adfc
[Modify] Edit it
sta May 25, 2025
3c2058e
[Modify] Polish it
sta May 26, 2025
b6795cf
[Modify] Edit it
sta May 27, 2025
ce0f9d3
[Modify] Edit it
sta May 27, 2025
4860b98
[Modify] Polish it
sta May 28, 2025
f1420dd
[Modify] Edit it
sta May 28, 2025
f40537a
[Modify] Polish it
sta May 29, 2025
19ab6b9
[Modify] Edit it
sta May 29, 2025
0fd70b9
[Modify] Edit it
sta May 30, 2025
7f3ac9e
[Modify] Polish it
sta May 31, 2025
aa2da78
[Modify] Edit it
sta May 31, 2025
8f3e421
[Modify] Edit it
sta May 31, 2025
98ce305
[Modify] Polish it
sta Jun 1, 2025
23dae9d
[Modify] Edit it
sta Jun 1, 2025
6eae789
[Modify] Edit it
sta Jun 1, 2025
7818022
[Modify] Polish it
sta Jun 2, 2025
01de7fc
[Modify] Edit it
sta Jun 2, 2025
c55be60
[Modify] Edit it
sta Jun 2, 2025
8f63712
[Modify] Polish it
sta Jun 3, 2025
0983c04
[Modify] Edit it
sta Jun 3, 2025
da445c8
[Modify] Edit it
sta Jun 3, 2025
8b3115e
[Modify] Polish it
sta Jun 4, 2025
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
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.

121 changes: 61 additions & 60 deletions Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,104 +18,105 @@ 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 ("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 ("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 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) => 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