Removed a part about setting the server error event
This commit is contained in:
parent
c2d480060c
commit
c464cf8f52
25
README.md
25
README.md
@ -204,7 +204,7 @@ Required namespace.
|
|||||||
using WebSocketSharp.Server;
|
using WebSocketSharp.Server;
|
||||||
```
|
```
|
||||||
|
|
||||||
The `WebSocketServer`, `WebSocketServiceHost<T>` and `WebSocketService` classes exist in the `WebSocketSharp.Server` namespace.
|
The `WebSocketService`, `WebSocketServiceHost<T>` and `WebSocketServer` classes exist in the `WebSocketSharp.Server` namespace.
|
||||||
|
|
||||||
#### Step 2 ####
|
#### Step 2 ####
|
||||||
|
|
||||||
@ -272,34 +272,13 @@ If you create a instance of the `WebSocketServer` class without the port number,
|
|||||||
|
|
||||||
#### Step 4 ####
|
#### Step 4 ####
|
||||||
|
|
||||||
Setting the event.
|
|
||||||
|
|
||||||
##### WebSocketServiceHost<T>.OnError Event #####
|
|
||||||
|
|
||||||
A `WebSocketServiceHost<T>.OnError` event occurs when the `WebSocketServiceHost<T>` gets an error.
|
|
||||||
|
|
||||||
```cs
|
|
||||||
wssv.OnError += (sender, e) =>
|
|
||||||
{
|
|
||||||
...
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
`e.Message` (`WebSocketSharp.ErrorEventArgs.Message`, its type is `string`) contains an error message, so you use it.
|
|
||||||
|
|
||||||
##### WebSocketServer.OnError Event #####
|
|
||||||
|
|
||||||
Same as the `WebSocketServiceHost<T>.OnError` event.
|
|
||||||
|
|
||||||
#### Step 5 ####
|
|
||||||
|
|
||||||
Starting the server.
|
Starting the server.
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
wssv.Start ();
|
wssv.Start ();
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Step 6 ####
|
#### Step 5 ####
|
||||||
|
|
||||||
Stopping the server.
|
Stopping the server.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user