52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Net;
|
|||
|
|
using System.Net.Sockets;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace LangGuan.Command.Model
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// scoket
|
|||
|
|
/// </summary>
|
|||
|
|
public class SocketModel
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 缓冲器
|
|||
|
|
/// </summary>
|
|||
|
|
private byte[] result = new byte[1024];
|
|||
|
|
/// <summary>
|
|||
|
|
/// 最大连接数
|
|||
|
|
/// </summary>
|
|||
|
|
private int maxClientCount;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 服务IP地址
|
|||
|
|
/// </summary>
|
|||
|
|
private string ip;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 服务端口号
|
|||
|
|
/// </summary>
|
|||
|
|
private int port;
|
|||
|
|
// 编码
|
|||
|
|
// private string code;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 客户端列表
|
|||
|
|
/// </summary>
|
|||
|
|
private List<Socket> ClientSockets;
|
|||
|
|
/// <summary>
|
|||
|
|
/// IP终端
|
|||
|
|
/// </summary>
|
|||
|
|
private IPEndPoint ipEndPoint;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 服务端Socket
|
|||
|
|
/// </summary>
|
|||
|
|
private Socket ServerSocket;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 当前客户端Socket
|
|||
|
|
/// </summary>
|
|||
|
|
private Socket ClientSocket;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|