using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using PhilExampleCrawler.Common.Models;
using PhilExampleCrawler.Common.TCP.Packets;

namespace PhilExample.Interfaces
{
    internal interface ITCPClient
    {
        bool IsConnected { get; }
        bool ConnectToServer(string ip, int port);
        void Disconnect();

        event EventHandler<int> OnUserConnected;
        event EventHandler<(int connectionID, BasePacket bp)> OnDataReceived;
        event EventHandler<int> OnUserDisconnected;

        bool IsUserRegistered { get; }
        DateTime? RegisteredUntil { get; }
        bool RegisterForUpdates(User user);
        void Unregister(User user);
    }
}
