Example #1
0
    private void OnConnection(ConnectionEvent e)
    {
        _server.EventDispatcher.ConnectionEvent -= OnConnection;

        LoginRequest request = new LoginRequest("user", "pass");

        _server.Send(request);
    }
Example #2
0
	// got a response for trying to connect to the server
	private void OnConnection(ConnectionEvent e)
	{
		// connected or not don't need to have this anymore.  since these are delegates need to be careful to remove them when not needed
		_server.EventDispatcher.ConnectionEvent -= OnConnection;

		// just pass the info through
		if (ConnectionEvent != null)
			ConnectionEvent(new Dictionary<string, object>(){ { "success", e.Success }, { "error", e.Error } });
	}