您的位置:首页 > 编程语言 > C#

简易C# socket

2018-06-21 15:17 369 查看

服务器

using System;

namespace Client
{
class Program
{
public static string inputValue;

static void Main(string[] args)
{
Socket_Client client = new Socket_Client();
client.Init("127.0.0.1", 88);
client.Connection();

while (inputValue != "Exit")
{
inputValue = Console.ReadLine();
client.SendMessage(inputValue);
if (inputValue == "Close")
{
client.Close();
}
}
}
}
}
View Code

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: