// Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(this);

        _socket.On("connect", @event =>
        {
            if (_connectionListener != null)
            {
                _connectionListener.OnConnected();
            }
            //OnConnected();
        });

        _socket.On("disconnect", @event =>
        {
            if (_connectionListener != null)
            {
                _connectionListener.OnDisconnected();
            }
            //OnDisconnected();
        });

        _socket.On("message", OnMessage);

        //_socket.On("error", @event =>
        //{
        //    Debug.Log("Error");
        //});
        //_socket.On("close", @event =>
        //{
        //    OnDisconnected();
        //});

        //_socket.Connect();
    }