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); ...
阅读全文
摘要:服务器端程序: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...
阅读全文
摘要:上面发了服务器端,没发客户端,现在补上!不知道写的好不好,见笑了 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); ...
阅读全文
浙公网安备 33010602011771号