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,098 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3098 commits
Select commit Hold shift + click to select a range
1181248
[Modify] Polish it
sta Aug 28, 2024
b08cb45
[Modify] Polish it
sta Aug 29, 2024
54dbb39
[Modify] Polish it
sta Aug 30, 2024
ca39edc
[Modify] Polish it
sta Aug 31, 2024
47a781c
[Modify] Polish it
sta Sep 1, 2024
3cde288
[Modify] Polish it
sta Sep 2, 2024
958fd85
[Modify] Polish it
sta Sep 2, 2024
ce63d22
[Modify] Polish it
sta Sep 3, 2024
2c65155
[Modify] Polish it
sta Sep 4, 2024
df9d51d
[Modify] Polish it
sta Sep 5, 2024
d461bf1
[Modify] 2024
sta Sep 6, 2024
d9c2d9b
[Modify] Edit it
sta Sep 7, 2024
3d3c412
[Modify] Polish it
sta Sep 8, 2024
ee3808e
[Modify] Edit it
sta Sep 9, 2024
14ce024
[Modify] Edit it
sta Sep 10, 2024
d9653d3
[Modify] Polish it
sta Sep 11, 2024
2490b03
[Modify] Polish it
sta Sep 11, 2024
5d9d135
[Modify] Polish it
sta Sep 12, 2024
ff858f1
[Modify] Polish it
sta Sep 12, 2024
e4d24a5
[Modify] Polish it
sta Sep 13, 2024
504f651
[Modify] Edit it
sta Sep 14, 2024
cf64c26
[Modify] Edit it
sta Sep 15, 2024
451dba7
[Modify] Polish it
sta Sep 16, 2024
49826e8
[Modify] Polish it
sta Sep 16, 2024
708431f
[Modify] Edit it
sta Sep 17, 2024
921a87b
[Modify] Polish it
sta Sep 17, 2024
14c1be1
[Modify] Polish it
sta Sep 18, 2024
b797b8d
[Modify] Polish it
sta Sep 18, 2024
011a4c2
[Modify] Edit it
sta Sep 19, 2024
f1a168c
[Modify] Polish it
sta Sep 19, 2024
3f807c0
[Modify] Edit it
sta Sep 20, 2024
764c100
[Modify] Edit it
sta Sep 20, 2024
30489e2
[Modify] Edit it
sta Sep 21, 2024
1800efd
[Modify] Edit it
sta Sep 22, 2024
7ded323
[Modify] Edit it
sta Sep 23, 2024
24baeb3
[Modify] Edit it
sta Sep 24, 2024
f0d2d65
[Modify] Edit it
sta Sep 25, 2024
1ca1529
[Modify] Edit it
sta Sep 26, 2024
77cf431
[Modify] Edit it
sta Sep 26, 2024
b9d43fa
[Modify] 2024
sta Sep 27, 2024
6c202e8
[Modify] Polish it
sta Sep 28, 2024
f3df7a1
[Modify] Polish it
sta Sep 29, 2024
96c88b1
[Modify] Polish it
sta Sep 30, 2024
9e6b503
[Modify] 2024
sta Oct 1, 2024
428c90f
[Modify] Polish it
sta Oct 2, 2024
16a34b1
[Modify] Polish it
sta Oct 3, 2024
a2d492f
[Modify] Polish it
sta Oct 4, 2024
86eaab0
[Modify] Polish it
sta Oct 5, 2024
2b48651
[Modify] Polish it
sta Oct 6, 2024
2783f2d
[Modify] Polish it
sta Oct 7, 2024
35d3eeb
[Modify] Polish it
sta Oct 8, 2024
cc95bd2
[Modify] Polish it
sta Oct 9, 2024
e310fb2
[Modify] Polish it
sta Oct 10, 2024
fa351f1
[Modify] Polish it
sta Oct 11, 2024
129c570
[Modify] Polish it
sta Oct 12, 2024
2debbf2
[Modify] Polish it
sta Oct 13, 2024
040e96f
[Modify] Polish it
sta Oct 14, 2024
dc190d8
[Modify] Polish it
sta Oct 15, 2024
b882f81
[Modify] Polish it
sta Oct 16, 2024
558bed2
[Modify] Use UTF-8
sta Oct 17, 2024
60b7645
[Modify] Polish it
sta Oct 18, 2024
44e8b78
[Modify] Polish it
sta Oct 19, 2024
938a121
[Modify] Edit it
sta Oct 20, 2024
e7514f8
[Modify] 2024
sta Oct 21, 2024
2c74375
[Modify] Edit it
sta Oct 22, 2024
e22e6fe
[Modify] Edit it
sta Oct 23, 2024
f1770b9
[Modify] Edit it
sta Oct 24, 2024
5d27254
[Modify] Edit it
sta Oct 25, 2024
8e1f511
[Modify] Edit it
sta Oct 26, 2024
991bf62
[Modify] Edit it
sta Oct 27, 2024
e692b81
[Modify] Edit it
sta Oct 28, 2024
2ecd706
[Modify] 2024
sta Oct 29, 2024
dc3c6e4
[Modify] Edit it
sta Oct 30, 2024
ad08726
[Modify] Edit it
sta Oct 31, 2024
0e86839
[Modify] Edit it
sta Nov 1, 2024
33ae1f9
[Modify] Edit it
sta Nov 2, 2024
4b1efa9
[Modify] Edit it
sta Nov 3, 2024
78a9808
[Modify] 2024
sta Nov 4, 2024
81bc74d
[Modify] Edit it
sta Nov 4, 2024
326f77d
[Modify] Edit it
sta Nov 4, 2024
ee42ec0
[Modify] Edit it
sta Nov 4, 2024
91a38aa
[Modify] Edit it
sta Nov 5, 2024
3531202
[Modify] Change the default value of the KeepClean property to false
sta Nov 6, 2024
9fbea8e
[Modify] Polish it
sta Nov 7, 2024
3defaa8
[Modify] Edit it
sta Nov 7, 2024
f43d286
[Modify] Polish it
sta Nov 8, 2024
5f53b53
[Modify] Polish it
sta Nov 9, 2024
9f84131
[Modify] 2024
sta Nov 10, 2024
3bb01b7
[Modify] Edit it
sta Nov 11, 2024
07a864f
[Modify] Edit it
sta Nov 12, 2024
03dd868
[Modify] Edit it
sta Nov 13, 2024
1485684
[Modify] Edit it
sta Nov 13, 2024
23c3a49
[Modify] Polish it
sta Nov 14, 2024
b334186
[Modify] 2024
sta Nov 15, 2024
638ef4a
[Modify] Log it
sta Nov 16, 2024
3e8a0b5
[Modify] Edit it
sta Nov 17, 2024
6ad5279
[Modify] Edit it
sta Nov 18, 2024
8b1872d
[Modify] 2024
sta Nov 18, 2024
dd17863
[Modify] Edit it
sta Nov 19, 2024
1f3f297
[Modify] Edit it
sta Nov 20, 2024
be6ad77
[Modify] Edit it
sta Nov 21, 2024
36c81ab
[Modify] Edit it
sta Nov 22, 2024
d577a25
[Modify] Polish it
sta Nov 23, 2024
8b05aa6
[Modify] Edit it
sta Nov 24, 2024
d496b50
[Modify] Edit it
sta Nov 25, 2024
2ac9218
[Modify] Edit it
sta Nov 26, 2024
823836d
[Modify] Edit it
sta Nov 27, 2024
a4f20a9
[Modify] Edit it
sta Nov 27, 2024
b408e20
[Modify] Edit it
sta Nov 28, 2024
f78f69e
[Modify] Edit it
sta Nov 29, 2024
f0b48c1
[Modify] 2024
sta Nov 30, 2024
beac69d
[Modify] Polish it
sta Dec 1, 2024
b27720f
[Modify] Edit it
sta Dec 2, 2024
d2b0990
[Modify] 2024
sta Dec 3, 2024
9f81d26
[Modify] Edit it
sta Dec 4, 2024
ef6c0c6
[Modify] Polish it
sta Dec 5, 2024
b79b1b8
[Modify] 2024
sta Dec 6, 2024
065dc50
[Modify] Rename it
sta Dec 7, 2024
24ef060
[Modify] Polish it
sta Dec 7, 2024
78c5a2a
[Modify] 2024
sta Dec 8, 2024
f6ba776
[Modify] Edit it
sta Dec 9, 2024
9f7cd2a
[Modify] 2024
sta Dec 10, 2024
3665e5e
[Modify] Edit it
sta Dec 11, 2024
2fb9da7
[Modify] Edit it
sta Dec 12, 2024
9d95bf8
[Modify] 2024
sta Dec 13, 2024
e60f5b9
[Modify] Polish it
sta Dec 14, 2024
3bbc45c
[Modify] Polish it
sta Dec 15, 2024
356af90
[Modify] 2024
sta Dec 16, 2024
1904d7c
[Modify] Polish it
sta Dec 17, 2024
22b40f7
[Modify] Polish it
sta Dec 18, 2024
5dc3bfd
[Modify] Polish it
sta Dec 19, 2024
27ca5e9
[Modify] Polish it
sta Dec 20, 2024
837197d
[Modify] Polish it
sta Dec 21, 2024
27b64c4
[Modify] Polish it
sta Dec 22, 2024
5428cdb
[Modify] Polish it
sta Dec 23, 2024
947f82a
[Modify] Polish it
sta Dec 24, 2024
f30193b
[Modify] Polish it
sta Dec 25, 2024
3174bcc
[Modify] Polish it
sta Dec 26, 2024
09ebb49
[Modify] Polish it
sta Dec 27, 2024
79e43e9
[Modify] Polish it
sta Dec 28, 2024
1766643
[Modify] Replace it
sta Dec 29, 2024
5554007
[Modify] Polish it
sta Dec 30, 2024
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
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.

71 changes: 32 additions & 39 deletions Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@ 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"))
Expand All @@ -34,32 +29,24 @@ public static void Main (string[] args)

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"
}
);
ws.OnMessage += (sender, e) => {
var fmt = "[WebSocket Message] {0}";
var body = !e.IsPing ? e.Data : "A ping was received.";

Console.WriteLine (fmt, body);
};

ws.OnError += (sender, e) => {
var fmt = "[WebSocket Error] {0}";

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

ws.OnClose += (sender, e) => {
var fmt = "[WebSocket Close ({0})] {1}";

Console.WriteLine (fmt, e.Code, e.Reason);
};
#if DEBUG
// To change the logging level.
ws.Log.Level = LogLevel.Trace;
Expand All @@ -69,6 +56,10 @@ public static void Main (string[] args)

// To emit a WebSocket.OnMessage event when receives a ping.
//ws.EmitOnPing = true;

// To disable a delay when send or receive buffer of the underlying
// TCP socket is not full.
ws.NoDelay = true;
#endif
// To enable the Per-message Compression extension.
//ws.Compression = CompressionMethod.Deflate;
Expand All @@ -77,13 +68,12 @@ public static void Main (string[] args)
/*
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.
};
Expand Down Expand Up @@ -112,10 +102,13 @@ public static void Main (string[] args)
//ws.ConnectAsync ();

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