HPSocket.Net
5.7.1.4
.Net Framework Supported:
.Net Framework 2.0+
.Net Core 2.0+
Platform supported:
Windows 7+ x86/x64
Linux kernel 2.6.32+ x86/x64
mac OS 10.12+ x64
(HP-Socket for Windows & Linux & OSX) HP-Socket is a set of high-performance TCP/
UDP/HTTP communication framework, including server, client and agent components. It is widely used in TCP/UDP/HTTP communication application in various scenarios. It provides C/C++, C#, Delphi, Java, Python and other programming language interfaces. HP-Socket completely encapsulates the communication layer, and the application does not need to pay attention to any details of the communication layer. HP-Socket provides an API interface based on event notification model, which can be easily and efficiently integrated into the new and old applications.
See the version list below for details.
Install-Package HPSocket.Net -Version 5.7.1.4
dotnet add package HPSocket.Net --version 5.7.1.4
<PackageReference Include="HPSocket.Net" Version="5.7.1.4" />
paket add HPSocket.Net --version 5.7.1.4
HPSocket.Net
Overview
the C# SDK for HP-Socket
.Net Framework Supported
.Net Framework 2.0+
.Net Core 2.0+
Platform supported
Windows 7+ x86/x64
Linux kernel 2.6.32+ x86/x64
mac OS 10.12+ x64
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
ITcpServer
ITcpAgent
ITcpClient
ITcpPullServer
ITcpPullAgent
ITcpPullClient
ITcpPackServer
ITcpPackAgent
ITcpPacClient
UDP
IUdpServer
IUdpClient
IUdpCast
IUdpArqServer
IUdpArqClient
IUdpNode
SSL
ISslServer
ISslAgent
ISslClient
ISslPullServer
ISslPullAgent
ISslPullClient
ISslPackServer
ISslPackAgent
ISslPackClient
HTTP
IHttpServer
IHttpsServer
IHttpAgent
IHttpsAgent
IHttpClient
IHttpsClient
IHttpSyncClient
IHttpsSyncClient
ThreadPool
ThreadPool
Extended components
ITcpPortForwarding
IHttpEasyServer
IHttpsEasyServer
IHttpEasyAgent
IHttpsEasyAgent
IHttpEasyClient
IHttpsEasyClient
IWebSocketServer
IWebSocketAgent
HPSocket.Net
provides a TCP port forwarding componentITcpPortForwarding
, 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.
OnEasyChunkData
Complete packet event for http CHUNK messageOnEasyMessageData
Complete packet event for http GET or POST messageOnEasyWebSocketMessageData
Complete packet event for WebSocket message
WebSocket
can also use the following two components directly
IWebSocketServer
WebSocket ServerIWebSocketAgent
WebSocket Client (Unlike other Agent components, the WebSocket Agent component does not support connecting to different WebSocket Servers, which means that all connections of theIWebSocketAgent
component can only connect to the same server)
Instructions
- For the use of most components, please refer to the project in the
demo
directory. - In addition to the
Pack
series model, theAgent
series components provided byHPSocket.Net
(including theITcpPortForwarding
component) support to settingHTTP
orSocks5
proxy, 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 withHTTP
andSocks5
proxy at the same time. For the usage method, refer to thedemo
of eachAgent
component.
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;
};
}
HPSocket.Net
Overview
the C# SDK for HP-Socket
.Net Framework Supported
.Net Framework 2.0+
.Net Core 2.0+
Platform supported
Windows 7+ x86/x64
Linux kernel 2.6.32+ x86/x64
mac OS 10.12+ x64
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
ITcpServer
ITcpAgent
ITcpClient
ITcpPullServer
ITcpPullAgent
ITcpPullClient
ITcpPackServer
ITcpPackAgent
ITcpPacClient
UDP
IUdpServer
IUdpClient
IUdpCast
IUdpArqServer
IUdpArqClient
IUdpNode
SSL
ISslServer
ISslAgent
ISslClient
ISslPullServer
ISslPullAgent
ISslPullClient
ISslPackServer
ISslPackAgent
ISslPackClient
HTTP
IHttpServer
IHttpsServer
IHttpAgent
IHttpsAgent
IHttpClient
IHttpsClient
IHttpSyncClient
IHttpsSyncClient
ThreadPool
ThreadPool
Extended components
ITcpPortForwarding
IHttpEasyServer
IHttpsEasyServer
IHttpEasyAgent
IHttpsEasyAgent
IHttpEasyClient
IHttpsEasyClient
IWebSocketServer
IWebSocketAgent
HPSocket.Net
provides a TCP port forwarding componentITcpPortForwarding
, 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.
OnEasyChunkData
Complete packet event for http CHUNK messageOnEasyMessageData
Complete packet event for http GET or POST messageOnEasyWebSocketMessageData
Complete packet event for WebSocket message
WebSocket
can also use the following two components directly
IWebSocketServer
WebSocket ServerIWebSocketAgent
WebSocket Client (Unlike other Agent components, the WebSocket Agent component does not support connecting to different WebSocket Servers, which means that all connections of theIWebSocketAgent
component can only connect to the same server)
Instructions
- For the use of most components, please refer to the project in the
demo
directory. - In addition to the
Pack
series model, theAgent
series components provided byHPSocket.Net
(including theITcpPortForwarding
component) support to settingHTTP
orSocks5
proxy, 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 withHTTP
andSocks5
proxy at the same time. For the usage method, refer to thedemo
of eachAgent
component.
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;
};
}
Dependencies
-
.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.
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|---|---|
5.8.1-beta3 | 82 | 1/17/2021 |
5.8.1-beta2 | 38 | 1/13/2021 |
5.8.1-beta1 | 99 | 12/14/2020 |
5.7.3.2 | 1,337 | 12/13/2020 |
5.7.3.1 | 94 | 12/13/2020 |
5.7.3 | 135 | 12/9/2020 |
5.7.3-beta1 | 125 | 11/15/2020 |
5.7.2.9 | 871 | 9/27/2020 |
5.7.2.8 | 333 | 9/13/2020 |
5.7.2 | 2,614 | 5/8/2020 |
5.7.2-rc2 | 148 | 4/28/2020 |
5.7.2-rc1 | 136 | 4/24/2020 |
5.7.1.13 | 307 | 4/23/2020 |
5.7.1.12 | 182 | 4/21/2020 |
5.7.1.11 | 244 | 4/12/2020 |
5.7.1.10 | 471 | 4/2/2020 |
5.7.1.9 | 260 | 3/27/2020 |
5.7.1.8 | 150 | 3/26/2020 |
5.7.1.5 | 988 | 2/27/2020 |
5.7.1.4 | 877 | 2/23/2020 |
5.7.1.3 | 159 | 2/23/2020 |
5.7.1.2 | 248 | 2/18/2020 |
5.7.1.1 | 513 | 1/9/2020 |