HPSocket.Net
5.8.1-beta1
See the version list below for details.
dotnet add package HPSocket.Net --version 5.8.1-beta1
NuGet\Install-Package HPSocket.Net -Version 5.8.1-beta1
<PackageReference Include="HPSocket.Net" Version="5.8.1-beta1" />
<PackageVersion Include="HPSocket.Net" Version="5.8.1-beta1" />
<PackageReference Include="HPSocket.Net" />
paket add HPSocket.Net --version 5.8.1-beta1
#r "nuget: HPSocket.Net, 5.8.1-beta1"
#:package HPSocket.Net@5.8.1-beta1
#addin nuget:?package=HPSocket.Net&version=5.8.1-beta1&prerelease
#tool nuget:?package=HPSocket.Net&version=5.8.1-beta1&prerelease
HPSocket.Net
Overview
the C# SDK for HP-Socket
.Net Framework Supported
.Net Framework 2.0+.Net Core 2.0+.Net 5.0
Platform supported
Windows 7+ x86/x64Linux kernel 2.6.32+ x86/x64mac OS 10.12+ x64Raspberry Pi 4B
About macOS
HPSocket.Net now supports development using.net core2.0 +inosx 10.12 +
Libhpsocket4c.dylib in Nuget package is compiled from HP-Socket-for-macOS
Components List
Basic Components
Basic component is the original component provided by HP-Socket. For related usage, please refer to HP-Socket Doc
TCP
ITcpServerITcpAgentITcpClientITcpPullServerITcpPullAgentITcpPullClientITcpPackServerITcpPackAgentITcpPacClient
UDP
IUdpServerIUdpClientIUdpCastIUdpArqServerIUdpArqClientIUdpNode
SSL
ISslServerISslAgentISslClientISslPullServerISslPullAgentISslPullClientISslPackServerISslPackAgentISslPackClient
HTTP
IHttpServerIHttpsServerIHttpAgentIHttpsAgentIHttpClientIHttpsClientIHttpSyncClientIHttpsSyncClient
ThreadPool
ThreadPool
Extended components
ITcpPortForwardingIHttpEasyServerIHttpsEasyServerIHttpEasyAgentIHttpsEasyAgentIHttpEasyClientIHttpsEasyClientIWebSocketServerIWebSocketAgent
HPSocket.Net provides a TCP port forwarding component ITcpPortForwarding, 10 lines of code can complete TCP port forwarding.
HPSocket.Net currently provides 6 Easy components and 2 WebSocket components for easier processing of http / https / ws data packets. The basic http components provided by HP-Socket need to implement the data packets themselves. Complete acquisition, Easy component has done these processing, http / https Easy component is bound to the following events, when the event arrives, you can get the complete data packet.
OnEasyChunkDataComplete packet event for http CHUNK messageOnEasyMessageDataComplete packet event for http GET or POST messageOnEasyWebSocketMessageDataComplete packet event for WebSocket message
WebSocket can also use the following two components directly
IWebSocketServerWebSocket ServerIWebSocketAgentWebSocket Client (Unlike other Agent components, the WebSocket Agent component does not support connecting to different WebSocket Servers, which means that all connections of theIWebSocketAgentcomponent can only connect to the same server)
Instructions
- For the use of most components, please refer to the project in the
demodirectory. - In addition to the
Packseries model, theAgentseries components provided byHPSocket.Net(including theITcpPortForwardingcomponent) support to settingHTTPorSocks5proxy, which can be set in the manner ofList<IProxy>. Multiple proxies can be set at the same time, which will be used randomly, and can be mixed withHTTPandSocks5proxy at the same time. For the usage method, refer to thedemoof eachAgentcomponent.
Easy component event binding example
IHttpEasyServer
// Create HttpEasyServer instance
using(IHttpEasyServer httpServer = new HttpEasyServer())
{
// ... other settings
// Binding OnEasyMessageData event
httpServer.OnEasyMessageData += (sender, id, data) =>
{
// The data parameter is a complete packet each time
// ... Process data
return HttpParseResult.Ok;
};
}
IHttpEasyAgent
// Create HttpEasyAgent instance
using(IHttpEasyAgent httpAgent = new HttpEasyAgent())
{
// ... other settings
// Binding OnEasyMessageData event
httpAgent.OnEasyMessageData += (sender, id, data) =>
{
// The data parameter is a complete packet each time
// ... Process data
return HttpParseResult.Ok;
};
}
IHttpEasyClient
// Create HttpEasyClient instance
using(IHttpEasyClient httpClient = new HttpEasyClient())
{
// ... other settings
// Binding OnEasyMessageData event
httpClient.OnEasyMessageData += (sender, data) =>
{
// The data parameter is a complete packet each time
// ... Process data
return HttpParseResult.Ok;
};
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 is compatible. netcoreapp2.2 is compatible. netcoreapp3.0 is compatible. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net20 is compatible. net30 is compatible. net35 is compatible. net35-client is compatible. net40 is compatible. net40-client is compatible. net403 was computed. net45 is compatible. net451 is compatible. net452 is compatible. net46 is compatible. net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.0
- No dependencies.
-
.NETCoreApp 2.1
- No dependencies.
-
.NETCoreApp 2.2
- No dependencies.
-
.NETCoreApp 3.0
- No dependencies.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 2.0
- No dependencies.
-
.NETFramework 3.0
- No dependencies.
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 3.5 Client
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.0 Client
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.5.1
- No dependencies.
-
.NETFramework 4.5.2
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net5.0
- No dependencies.
NuGet packages (11)
Showing the top 5 NuGet packages that depend on HPSocket.Net:
| Package | Downloads |
|---|---|
|
Smart.Ports
Smart.Ports是一个统一的通信端口类库,提供了一致的接口来操作不同类型的通信端口,包括串口(SerialPort)、TCP客户端(TcpClient)、TCP服务端(TcpServer)和UDP节点(Udp)。该类库使用工厂模式简化端口创建,并通过继承关系提供特定端口类型的扩展功能。 Smart.Ports is a unified communication port library that provides a consistent interface for operating different types of communication ports, including SerialPort, TcpClient, TcpServer, and Udp. The library uses the factory pattern to simplify port creation and provides extended functionality for specific port types through inheritance. |
|
|
SocketLibrary.Core
SocketLibrary core library. |
|
|
Tkx.Common.SocketComponent
Package Description |
|
|
xCore2
Package Description |
|
|
ADClass
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.7.1 | 379 | 12/26/2025 |
| 6.0.7 | 583 | 10/20/2025 |
| 6.0.6.2 | 312 | 10/3/2025 |
| 6.0.6.1 | 227 | 10/1/2025 |
| 6.0.3.1 | 4,612 | 12/2/2024 |
| 6.0.3 | 1,434 | 10/8/2024 |
| 6.0.2 | 1,429 | 8/16/2024 |
| 6.0.1.8 | 1,522 | 7/6/2024 |
| 6.0.1.1 | 2,749 | 4/11/2024 |
| 6.0.1 | 1,280 | 2/29/2024 |
| 5.9.5.1 | 1,634 | 1/22/2024 |
| 5.9.5 | 983 | 1/21/2024 |
| 5.9.4.1 | 1,003 | 1/18/2024 |
| 5.8.1-beta1 | 2,310 | 12/14/2020 |