HPSocket.Net 5.8.2.2

There is a newer version of this package available.
See the version list below for details.
Install-Package HPSocket.Net -Version 5.8.2.2
dotnet add package HPSocket.Net --version 5.8.2.2
<PackageReference Include="HPSocket.Net" Version="5.8.2.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HPSocket.Net --version 5.8.2.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HPSocket.Net, 5.8.2.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install HPSocket.Net as a Cake Addin
#addin nuget:?package=HPSocket.Net&version=5.8.2.2

// Install HPSocket.Net as a Cake Tool
#tool nuget:?package=HPSocket.Net&version=5.8.2.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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/x64
  • Linux kernel 2.6.32+ x86/x64
  • mac OS 10.12+ x64
  • Raspberry 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
  • 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 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.

  • OnEasyChunkData Complete packet event for http CHUNK message
  • OnEasyMessageData Complete packet event for http GET or POST message
  • OnEasyWebSocketMessageData Complete packet event for WebSocket message

WebSocket can also use the following two components directly

  • IWebSocketServer WebSocket Server
  • IWebSocketAgent WebSocket Client (Unlike other Agent components, the WebSocket Agent component does not support connecting to different WebSocket Servers, which means that all connections of the IWebSocketAgent component can only connect to the same server)

Instructions

  1. For the use of most components, please refer to the project in the demo directory.
  2. In addition to the Pack series model, the Agent series components provided by HPSocket.Net (including the ITcpPortForwarding component) support to setting HTTP or Socks5 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 with HTTP and Socks5 proxy at the same time. For the usage method, refer to the demo of each Agent 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;
    };
}
  • .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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.8.5 473 9/5/2021
5.8.4.1 864 8/9/2021
5.8.4 1,096 7/23/2021
5.8.4-beta2 68 7/11/2021
5.8.3.2 326 7/8/2021
5.8.3.1 1,457 5/15/2021
5.8.2.5 314 4/23/2021
5.8.2.4 92 4/23/2021
5.8.2.3 82 4/22/2021
5.8.2.2 84 4/21/2021
5.8.2.1 351 4/20/2021
5.8.2 1,214 3/13/2021
5.8.1.1 1,301 1/26/2021
5.8.1-beta3 141 1/17/2021
5.8.1-beta2 91 1/13/2021
5.8.1-beta1 195 12/14/2020
5.7.3.2 1,544 12/13/2020
5.7.3.1 188 12/13/2020
5.7.3 254 12/9/2020
5.7.3-beta1 206 11/15/2020
5.7.2.9 1,159 9/27/2020
5.7.2.8 444 9/13/2020
5.7.2 2,998 5/8/2020
5.7.2-rc2 224 4/28/2020
5.7.2-rc1 215 4/24/2020
5.7.1.13 418 4/23/2020
5.7.1.12 264 4/21/2020
5.7.1.11 323 4/12/2020
5.7.1.10 561 4/2/2020
5.7.1.9 349 3/27/2020
5.7.1.8 231 3/26/2020
5.7.1.5 1,121 2/27/2020
5.7.1.4 1,226 2/23/2020
5.7.1.3 242 2/23/2020
5.7.1.2 340 2/18/2020
5.7.1.1 631 1/9/2020