using Apewer;
using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;

namespace Apewer.Network
{

    /// <summary></summary>
    public struct SocketEndPoint
    {

        internal SocketEndPoint(Socket socket, string ip, int port)
        {
            Socket = socket;
            IP = ip ?? TextUtility.Empty;
            Port = NumberUtility.Restrict(port, 0, ushort.MaxValue);
        }

        /// <summary></summary>
        public Socket Socket { get; }

        /// <summary></summary>
        public string IP { get; }

        /// <summary></summary>
        public int Port { get; }

    }

}