HL.UDP 2.0.9

HL.UDP

UDP 网络通信组件,提供 UDP 数据报通信功能。

功能特性

  • UDP 发送和接收
  • 组播支持
  • 异步通信
  • 数据包处理

安装

dotnet add package HL.UDP

使用示例

using HL.UDP;

// UDP 服务器
var udpServer = new UDPServer(8090);
udpServer.Start();
udpServer.OnDataReceived += (endpoint, data) =>
{
    Console.WriteLine($"Received from {endpoint}: {data}");
    udpServer.Send(endpoint, "ACK");
};

// UDP 客户端
var udpClient = new UDPClient();
udpClient.Send("192.168.1.100", 8090, "Hello");

许可证

MIT License

Copyright © 2025 HL

Showing the top 20 packages that depend on HL.UDP.

Packages Downloads
HL.MCP.Service.UDP
UDP server service implementation for the HL MCP framework with configurable protocol parsing.
0

.NET Framework 4.6.2

  • No dependencies.

Version Downloads Last updated
2.0.9 0 08/19/2026