using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Collections; using System.Net; using System.Net.Sockets; using System.Threading; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.IO; using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; using DataClass; namespace server { public partial class Form1 : Form { public string random = ""; private static IPAddress myIP; //把字符串转换为IPAddress格式; private static int Serverport = 5555;//端口号 public Form1() { InitializeComponent(); }
//random Random rnd = new Random(); int r1 = rnd.Next(200,300); int r2 = rnd.Next(899, 1025); int r3 = rnd.Next(358, 500); int r4 = rnd.Next(700, 800);