Elight.Utility/Network/TCPUtils.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace Elight.Utility.Network
{
public class TCPUtils
{
private TcpClient tcpClient;
private string ipAddress = "127.0.0.1";
private int port = 502;
private int connectTimeout = 1000;
private bool connected = false;
private NetworkStream stream;
/// <summary>
/// 判断是否已经连接
/// </summary>
public bool Connected
{
get
{
if (tcpClient == null)
{
return false;
}
return connected;
}
}
public string IPAddress
{
get
{
return ipAddress;
}
set
{
ipAddress = value;
}
}
public int Port
{
get
{
return port;
}
set
{
port = value;
}
}
后面还有 105 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。