资源简介
用C#写的TCP_IP服务器,支持发送HEX和ASCII切换;支持接收HEX和ASCII切换

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace TCP_IP
{
class cMyMathClass
{
public static ArrayList Str16ToArrayList(string strIn)//字符串拆分
{
string sParse = ““;
ArrayList myAL = new ArrayList();
int i = 0;
foreach (char cc in strIn)
{
i++;
if (cc == ‘ ‘ || sParse.Length == 2)
{
myAL.Add(sParse);
if (sParse.Length == 2 && cc != ‘ ‘)//两个字符
{
sParse = Convert.ToString(cc);
}
else
{
sParse = ““;
}
}
else
{
sParse += Convert.ToString(cc);
if (i == strIn.Length && cc != ‘ ‘)//末尾字符
{
myAL.Add(sParse);
}
}
}
return myAL;
}
public static string strAddSpace(string strInData)//以两个或空格问区分字符串增加空格
{
string strParse = ““;
string strAddResult = ““;
int i = 0;
foreach (char cc in strInData)
{
i++;
if (cc == ‘ ‘ || strParse.Length == 2)
{
strAddResult += strParse + “ “;
if (strParse.Length == 2 && cc != ‘ ‘)//两个字符
{
strParse = Convert.ToString(cc);
}
else
{
strParse = ““;
}
}
else
{
strParse += Convert.ToString(cc);
}
if (i == strInData.Length && cc != ‘ ‘)//末尾字符
{
strAddResult += strParse;
}
}
return strAddResult;
}
public static string strSubSpace(string strInData)//去除字符串中空格并把单个字符串前面加0
{
string strParse = “ “ + strInData + “ “;//将头和尾组合成一样的形式
string strParseTemp = ““;
string strSubResult = ““;
//int i = 0;
for (int i = 0; i < strParse.Length; i++)
{
//char myChar
/*if ((i == 0) && (strParse[1]==‘ ‘))
{
strParseTemp = “0“ + strParse[0].ToString();
strSubResult += strParseTemp;
}
else*/
if ((i > 0) && (i < strInData.Length + 1))
{
if ((strParse[i] != ‘ ‘) && (strParse[i - 1] == ‘ ‘) && (strParse[i + 1] == ‘ ‘))
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-08-09 11:23 2、TCP_IP_Sever\
目录 0 2018-08-09 11:23 2、TCP_IP_Sever\TCP_IP\
目录 0 2018-08-09 11:23 2、TCP_IP_Sever\TCP_IP\TCP_IP\
文件 27046 2018-06-12 11:12 2、TCP_IP_Sever\TCP_IP\TCP_IP\Form1.Designer.cs
文件 23907 2018-06-26 10:53 2、TCP_IP_Sever\TCP_IP\TCP_IP\Form1.cs
文件 6215 2018-06-12 11:12 2、TCP_IP_Sever\TCP_IP\TCP_IP\Form1.resx
文件 8780 2018-06-12 13:07 2、TCP_IP_Sever\TCP_IP\TCP_IP\MyTcpServer.cs
文件 487 2018-05-25 14:21 2、TCP_IP_Sever\TCP_IP\TCP_IP\Program.cs
目录 0 2018-08-09 11:23 2、TCP_IP_Sever\TCP_IP\TCP_IP\Properties\
文件 1362 2018-05-25 14:21 2、TCP_IP_Sever\TCP_IP\TCP_IP\Properties\AssemblyInfo.cs
文件 4306 2018-05-25 14:35 2、TCP_IP_Sever\TCP_IP\TCP_IP\Properties\Resources.Designer.cs
文件 6897 2018-05-25 14:35 2、TCP_IP_Sever\TCP_IP\TCP_IP\Properties\Resources.resx
文件 1093 2018-05-25 14:21 2、TCP_IP_Sever\TCP_IP\TCP_IP\Properties\Settings.Designer.cs
文件 249 2018-05-25 14:21 2、TCP_IP_Sever\TCP_IP\TCP_IP\Properties\Settings.settings
文件 4173 2018-06-06 14:12 2、TCP_IP_Sever\TCP_IP\TCP_IP\TCP_IP.csproj
目录 0 2018-08-09 11:23 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\
目录 0 2018-08-09 11:23 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\
文件 7814 2017-02-26 19:26 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\1.jpg
文件 262395 2017-02-26 19:28 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\2.jpg
文件 365056 2018-06-26 10:53 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\TCP_IP.exe
文件 67072 2018-06-26 10:53 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\TCP_IP.pdb
文件 11600 2018-06-26 10:53 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\TCP_IP.vshost.exe
文件 490 2009-08-31 00:40 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\TCP_IP.vshost.exe.manifest
文件 21065 2017-02-27 13:22 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\green.png
文件 17187 2017-02-27 13:22 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Debug\red.png
目录 0 2018-08-09 11:23 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Release\
文件 7814 2017-02-26 19:26 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Release\1.jpg
文件 262395 2017-02-26 19:28 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Release\2.jpg
文件 363520 2018-06-26 10:53 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Release\TCP_IP.exe
文件 65024 2018-06-26 10:53 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Release\TCP_IP.pdb
文件 11600 2018-07-31 08:36 2、TCP_IP_Sever\TCP_IP\TCP_IP\bin\Release\TCP_IP.vshost.exe
............此处省略37个文件信息
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论