SharpTox.Core.Tox.GetFriendConnectionStatus C# (CSharp) Method

GetFriendConnectionStatus() public method

Retrieves a friend's connection status.
public GetFriendConnectionStatus ( int friendNumber ) : ToxConnectionStatus
friendNumber int The friend number to retrieve the connection status of.
return ToxConnectionStatus
        public ToxConnectionStatus GetFriendConnectionStatus(int friendNumber)
        {
            var error = ToxErrorFriendQuery.Ok;
            return GetFriendConnectionStatus(friendNumber, out error);
        }

Same methods

Tox::GetFriendConnectionStatus ( int friendNumber, ToxErrorFriendQuery &error ) : ToxConnectionStatus

Usage Example

Example #1
0
        public void Init()
        {
            var options = new ToxOptions(true, true);
            _tox1 = new Tox(options);
            _tox2 = new Tox(options);

            _tox1.AddFriend(_tox2.Id, "hey");
            _tox2.AddFriend(_tox1.Id, "hey");

            while (_tox1.GetFriendConnectionStatus(0) == ToxConnectionStatus.None)
            {
                DoIterate();
            }
        }
All Usage Examples Of SharpTox.Core.Tox::GetFriendConnectionStatus