@@ -26,6 +26,7 @@ public static void Setup(WebServer server)
26
26
}
27
27
}
28
28
29
+ /// <inheritdoc />
29
30
/// <summary>
30
31
/// Defines a very simple chat server
31
32
/// </summary>
@@ -37,13 +38,8 @@ public WebSocketsChatServer()
37
38
{
38
39
// placeholder
39
40
}
40
-
41
- /// <summary>
42
- /// Called when this WebSockets Server receives a full message (EndOfMessage) form a WebSockets client.
43
- /// </summary>
44
- /// <param name="context">The context.</param>
45
- /// <param name="rxBuffer">The rx buffer.</param>
46
- /// <param name="rxResult">The rx result.</param>
41
+
42
+ /// <inheritdoc />
47
43
protected override void OnMessageReceived ( WebSocketContext context , byte [ ] rxBuffer ,
48
44
WebSocketReceiveResult rxResult )
49
45
{
@@ -53,29 +49,18 @@ protected override void OnMessageReceived(WebSocketContext context, byte[] rxBuf
53
49
}
54
50
}
55
51
56
- /// <summary>
57
- /// Gets the name of the server.
58
- /// </summary>
59
- /// <value>
60
- /// The name of the server.
61
- /// </value>
52
+
53
+ /// <inheritdoc />
62
54
public override string ServerName => nameof ( WebSocketsChatServer ) ;
63
55
64
- #if NET47 /// <summary>
65
- /// Called when this WebSockets Server accepts a new WebSockets client.
66
- /// </summary>
67
- /// <param name="context">The context.</param>
68
- /// <param name="localEndPoint">The local endpoint.</param>
69
- /// /// <param name="remoteEndPoint">The remote endpoint.</param>
56
+ #if NET47
57
+ /// <inheritdoc />
70
58
protected override void OnClientConnected (
71
59
WebSocketContext context ,
72
60
System . Net . IPEndPoint localEndPoint ,
73
61
System . Net . IPEndPoint remoteEndPoint )
74
62
#else
75
- /// <summary>
76
- /// Called when this WebSockets Server accepts a new WebSockets client.
77
- /// </summary>
78
- /// <param name="context">The context.</param>
63
+ /// <inheritdoc />
79
64
protected override void OnClientConnected ( WebSocketContext context )
80
65
#endif
81
66
{
@@ -86,23 +71,15 @@ protected override void OnClientConnected(WebSocketContext context)
86
71
Send ( ws , "Someone joined the chat room." ) ;
87
72
}
88
73
}
89
-
90
- /// <summary>
91
- /// Called when this WebSockets Server receives a message frame regardless if the frame represents the EndOfMessage.
92
- /// </summary>
93
- /// <param name="context">The context.</param>
94
- /// <param name="rxBuffer">The rx buffer.</param>
95
- /// <param name="rxResult">The rx result.</param>
74
+
75
+ /// <inheritdoc />
96
76
protected override void OnFrameReceived ( WebSocketContext context , byte [ ] rxBuffer ,
97
77
WebSocketReceiveResult rxResult )
98
78
{
99
79
return ;
100
80
}
101
-
102
- /// <summary>
103
- /// Called when the server has removed a WebSockets connected client for any reason.
104
- /// </summary>
105
- /// <param name="context">The context.</param>
81
+
82
+ /// <inheritdoc />
106
83
protected override void OnClientDisconnected ( WebSocketContext context )
107
84
{
108
85
Broadcast ( "Someone left the chat room." ) ;
@@ -111,7 +88,8 @@ protected override void OnClientDisconnected(WebSocketContext context)
111
88
#endif
112
89
}
113
90
}
114
-
91
+
92
+ /// <inheritdoc />
115
93
/// <summary>
116
94
/// Define a command-line interface terminal
117
95
/// </summary>
@@ -123,13 +101,8 @@ public class WebSocketsTerminalServer : WebSocketsServer
123
101
124
102
// The SyncRoot is used to send 1 thing at a time and multithreaded Processes dictionary.
125
103
private readonly object _syncRoot = new object ( ) ;
126
-
127
- /// <summary>
128
- /// Called when this WebSockets Server receives a full message (EndOfMessage) form a WebSockets client.
129
- /// </summary>
130
- /// <param name="context">The context.</param>
131
- /// <param name="rxBuffer">The rx buffer.</param>
132
- /// <param name="rxResult">The rx result.</param>
104
+
105
+ /// <inheritdoc />
133
106
protected override void OnMessageReceived ( WebSocketContext context , byte [ ] rxBuffer ,
134
107
WebSocketReceiveResult rxResult )
135
108
{
@@ -139,13 +112,8 @@ protected override void OnMessageReceived(WebSocketContext context, byte[] rxBuf
139
112
_processes [ context ] . StandardInput . WriteLine ( arg ) ;
140
113
}
141
114
}
142
-
143
- /// <summary>
144
- /// Called when this WebSockets Server receives a message frame regardless if the frame represents the EndOfMessage.
145
- /// </summary>
146
- /// <param name="context">The context.</param>
147
- /// <param name="rxBuffer">The rx buffer.</param>
148
- /// <param name="rxResult">The rx result.</param>
115
+
116
+ /// <inheritdoc />
149
117
protected override void OnFrameReceived ( WebSocketContext context , byte [ ] rxBuffer ,
150
118
WebSocketReceiveResult rxResult )
151
119
{
@@ -170,21 +138,14 @@ private WebSocketContext FindContext(Process p)
170
138
return null ;
171
139
}
172
140
173
- #if NET47 /// <summary>
174
- /// Called when this WebSockets Server accepts a new WebSockets client.
175
- /// </summary>
176
- /// <param name="context">The context.</param>
177
- /// <param name="localEndPoint">The local endpoint.</param>
178
- /// <param name="remoteEndPoint">The remote endpoint.</param>
141
+ #if NET47
142
+ /// <inheritdoc />
179
143
protected override void OnClientConnected (
180
144
WebSocketContext context ,
181
145
System . Net . IPEndPoint localEndPoint ,
182
146
System . Net . IPEndPoint remoteEndPoint )
183
147
#else
184
- /// <summary>
185
- /// Called when this WebSockets Server accepts a new WebSockets client.
186
- /// </summary>
187
- /// <param name="context">The context.</param>
148
+ /// <inheritdoc />
188
149
protected override void OnClientConnected ( WebSocketContext context )
189
150
#endif
190
151
{
@@ -251,11 +212,8 @@ protected override void OnClientConnected(WebSocketContext context)
251
212
process . BeginOutputReadLine ( ) ;
252
213
253
214
}
254
-
255
- /// <summary>
256
- /// Called when the server has removed a WebSockets connected client for any reason.
257
- /// </summary>
258
- /// <param name="context">The context.</param>
215
+
216
+ /// <inheritdoc />
259
217
protected override void OnClientDisconnected ( WebSocketContext context )
260
218
{
261
219
lock ( _syncRoot )
@@ -264,13 +222,8 @@ protected override void OnClientDisconnected(WebSocketContext context)
264
222
_processes [ context ] . Kill ( ) ;
265
223
}
266
224
}
267
-
268
- /// <summary>
269
- /// Gets the name of the server.
270
- /// </summary>
271
- /// <value>
272
- /// The name of the server.
273
- /// </value>
225
+
226
+ /// <inheritdoc />
274
227
public override string ServerName => nameof ( WebSocketsTerminalServer ) ;
275
228
}
276
229
}
0 commit comments