Class DisconnectedEvent
Event occurring when bot gets disconnected from server.
Implements
Inherited Members
Namespace: Robocode.TankRoyale.BotApi.Events
Assembly: Robocode.TankRoyale.BotApi.dll
Syntax
public sealed class DisconnectedEvent : ConnectionEvent, IEvent
Constructors
| Edit this page View SourceDisconnectedEvent(Uri, bool, int?, string)
Initializes a new instance of the DisconnectedEvent class.
Declaration
[JsonConstructor]
public DisconnectedEvent(Uri serverUri, bool remote, int? statusCode, string reason)
Parameters
Type | Name | Description |
---|---|---|
Uri | serverUri | URI of the server. |
bool | remote | Indication if closing of the connection was initiated by the remote host. |
int? | statusCode | Is a status code that indicates the reason for closing the connection. |
string | reason | Is a message with the reason for closing the connection. |
Properties
| Edit this page View SourceReason
Message with the reason for closing the connection. Might be null.
Declaration
public string Reason { get; }
Property Value
Type | Description |
---|---|
string |
Remote
Indication if closing of the connection was initiated by the remote host.
Declaration
public bool Remote { get; }
Property Value
Type | Description |
---|---|
bool |
StatusCode
Status code that indicates the reason for closing the connection. Might be null.
Declaration
public int? StatusCode { get; }
Property Value
Type | Description |
---|---|
int? |