private void OnDisconnection(RakNet.Packet packet, RakPeerInterface server, string reason) { logger.Trace("Disconnected from endpoint {0}", packet.systemAddress); var c = RemoveConnection(packet.guid); server.DeallocatePacket(packet); _handler.CloseConnection(c, reason); var action = ConnectionClosed; if (action != null) { action(c); } if (c != null) { var a = c.ConnectionClosed; if (a != null) { a(reason); } } }
private void OnDisconnection(RakNet.Packet packet, RakPeerInterface server, string reason) { _logger.Trace("transports.raknet", "{0} disconnected", packet.systemAddress); var c = RemoveConnection(packet.guid); server.DeallocatePacket(packet); _handler.CloseConnection(c, reason); c.RaiseConnectionClosed(reason); var action = ConnectionClosed; if (action != null) { action(c); } }
public void CloseConnection() { _connectionManager.CloseConnection(); }
public async override Task OnDisconnectedAsync(Exception exception) { await connectionManager.CloseConnection(Context.ConnectionId); await base.OnDisconnectedAsync(exception); }
public async Task <CloseConnectionResponse> Handle(CloseConnectionRequest request, CancellationToken cancellationToken) { await connectionManager.CloseConnection(request.HubName); return(new CloseConnectionResponse()); }
private void Close() { _connectionManager.CloseConnection(); }