You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
649 B

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; }
}
}