11 2011 档案

摘要:C# code namespace UDPServer { class Program { static void Main(string[] args) { int recv; byte[] data = new byte[1024]; //构建TCP 服务器 //得到本机IP,设置TCP端口号 IPEndPoint ipep = new IPEndPoint(IPAddress.Any , 8001); ... 阅读全文
posted @ 2011-11-04 11:05 虫虫虫虫飞 阅读(160) 评论(0) 推荐(0)
摘要:服务器端程序:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Net;using System.Net.Sockets;using System.Windows.Forms;namespace WindowsFormsApplication2{ public partial class Form1 : Form { private static TcpListener listener; privat... 阅读全文
posted @ 2011-11-04 10:47 虫虫虫虫飞 阅读(120) 评论(0) 推荐(0)
摘要:上面发了服务器端,没发客户端,现在补上!不知道写的好不好,见笑了 C# code public partial class Form1 : Form { private TcpClient client; private bool isExit = false; private NetworkStream networkStream; private EventWaitHandle allDone = new EventWaitHandle(false, EventResetMode.ManualReset); ... 阅读全文
posted @ 2011-11-03 16:45 虫虫虫虫飞 阅读(296) 评论(0) 推荐(0)
摘要:int float true false bool && ||仅作测 阅读全文
posted @ 2011-11-03 00:00 虫虫虫虫飞 阅读(71) 评论(0) 推荐(0)