NetManager.Stop C# (CSharp) Method

Stop() public method

public Stop ( ) : void
return void
	public void Stop () {

		if (connection.clientId == null)
			return;

		// Unregisters the client and leaves the room (if in one)
		JSONObject obj = JSONObject.Create ();
		obj.AddField ("roomId", connection.connected ? connection.roomId : "");
		obj.AddField ("clientId", connection.clientId);

		Emit ("leaveRoom", obj, (SocketIOEvent e) => {
			OnRoomDestroyed ();
		});
	}

Usage Example

コード例 #1
0
 public virtual void Stop()
 {
     IsRunning = false;
     _cancellationToken.Cancel();
     NetworkTimer.Stop();
     NetManager.Stop();
 }
All Usage Examples Of NetManager::Stop