📄 sockethelper.cs
字号:
using System;
using System.Net.Sockets;
namespace PlayCardClient
{
public class SocketHelper
{
private TcpClient connection;
private static SocketHelper mySingleton;
private SocketHelper()
{
connection = new TcpClient("localhost", 5151);
}
public static SocketHelper Instance()
{
if (mySingleton == null)
{
mySingleton = new SocketHelper();
}
return mySingleton;
}
public TcpClient Connection
{
get
{
return connection;
}
}
public void Dispose()
{
mySingleton = null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -