-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement disconnection event (raised after the connection was lost).
- Loading branch information
Showing
5 changed files
with
91 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace Websocket.Client | ||
{ | ||
/// <summary> | ||
/// Type that specify happenend disconnection | ||
/// </summary> | ||
public enum DisconnectionType | ||
{ | ||
/// <summary> | ||
/// Type used for exit event, disposing of the websocket client | ||
/// </summary> | ||
Exit = 0, | ||
|
||
/// <summary> | ||
/// Type used when connection to websocket was lost in meantime | ||
/// </summary> | ||
Lost = 1, | ||
|
||
/// <summary> | ||
/// Type used when connection to websocket was lost by not receiving any message in given timerange | ||
/// </summary> | ||
NoMessageReceived = 2, | ||
|
||
/// <summary> | ||
/// Type used when connection or reconnection returned error | ||
/// </summary> | ||
Error = 3, | ||
|
||
/// <summary> | ||
/// Type used when disconnection was requested by user | ||
/// </summary> | ||
ByUser = 4 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
namespace Websocket.Client | ||
{ | ||
/// <summary> | ||
/// Type that specify happenend reconnection | ||
/// </summary> | ||
public enum ReconnectionType | ||
{ | ||
/// <summary> | ||
/// Type used for initial connection to websocket stream | ||
/// </summary> | ||
Initial, | ||
Initial = 0, | ||
|
||
/// <summary> | ||
/// Type used when connection to websocket was lost in meantime | ||
/// </summary> | ||
Lost, | ||
Lost = 1, | ||
|
||
/// <summary> | ||
/// Type used when connection to websocket was lost by not receiving any message in given timerange | ||
/// </summary> | ||
NoMessageReceived, | ||
NoMessageReceived = 2, | ||
|
||
/// <summary> | ||
/// Type used after unsuccessful previous reconnection | ||
/// </summary> | ||
Error, | ||
Error = 3, | ||
|
||
/// <summary> | ||
/// Type used when reconnection was requested by user | ||
/// </summary> | ||
ByUser | ||
ByUser = 4 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters