C#UDP(接收和发送源码)源码完整 最近做了一个UDP 的服务接收和发送的东西
希望能对初学的朋友一点帮助
源码如下: 一
逻辑--UdpServer
cs using System; using System
Net; using System
Sockets; using System
Threading; using System
Diagnostics; using System
Windows
Forms; using System
Collections
Generic; using System
Linq; using PitchServer
po; namespace PitchServer
vo { class UdpServer { #region 构造方法 public UdpServer():this(50000,1024){} public UdpServer(ushort port):this(port,1024) { _Port = port; } public UdpServer(ushort port,uint bufferSize) { _Port = port; _bufferSize = bufferSize; } #endregion #region 属性 ushort _Port = 50000; public ushort Port { get { return _Port; } } uint _bufferSize = 1024; public uint BufferSize { get{return _bufferSize;} } bool m_IsRunning; public bool IsRunning { get{return m_IsRunning;} } public static Socke