{"id":27120719,"url":"https://github.com/awatercolorpen/holeoverhttp","last_synced_at":"2026-05-19T10:33:19.920Z","repository":{"id":28234365,"uuid":"117411714","full_name":"AWaterColorPen/HoleOverHttp","owner":"AWaterColorPen","description":"Library to help providing server api and connection to client","archived":false,"fork":false,"pushed_at":"2022-12-08T05:22:30.000Z","size":81,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T11:20:30.422Z","etag":null,"topics":["connection-pool","dotnet-core","http","network-security-groups","websocket"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/HoleOverHttp/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AWaterColorPen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-14T07:41:57.000Z","updated_at":"2019-10-23T08:43:04.000Z","dependencies_parsed_at":"2023-01-14T08:24:15.359Z","dependency_job_id":null,"html_url":"https://github.com/AWaterColorPen/HoleOverHttp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWaterColorPen%2FHoleOverHttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWaterColorPen%2FHoleOverHttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWaterColorPen%2FHoleOverHttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWaterColorPen%2FHoleOverHttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AWaterColorPen","download_url":"https://codeload.github.com/AWaterColorPen/HoleOverHttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631821,"owners_count":20970068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["connection-pool","dotnet-core","http","network-security-groups","websocket"],"created_at":"2025-04-07T10:07:28.557Z","updated_at":"2026-05-19T10:33:19.872Z","avatar_url":"https://github.com/AWaterColorPen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HoleOverHttp\n\n[![Build Status](https://dev.azure.com/hellis/GitHub/_apis/build/status/AWaterColorPen.HoleOverHttp?branchName=master)](https://dev.azure.com/hellis/GitHub/_build/latest?definitionId=4\u0026branchName=master)\n[![NuGet version](https://badge.fury.io/nu/HoleOverHttp.svg)](https://badge.fury.io/nu/HoleOverHttp)\n\nLibrary to help providing server api and connection to client.\nImplementation in C#, targeting .NET Standard 2.1+.\n\nThe library can help server acoss network security groups and firewall to provider api and connection to multi clients.\n\n## Usage\n\n- Install\n\n```shell\nInstall-Package HoleOverHttp\n```\n\n- Provider Connection\n\n```cs\nIAuthorizationProvider authorizationProvider = new Mock\u003cIAuthorizationProvider\u003e().Object;\nvar providerConnection = new WebSocketProviderConnection(host: \"localhost:23333\", namespace: \"namespace\", tokenProvider: authorizationProvider);\n\n// set secure\nproviderConnection.Secure = false;\n```\n\n- Service Object as a class\n\n```cs\npublic class ServiceObject\n{\n    public int MethodName(int param)\n    {\n        return param * param;\n    }\n}\n```\n\n- Server Provider\n\n```cs\n// register service and connection\nvar serverProvider = new ReflectCallProvider();\nserverProvider.RegisterConnection(providerConnection);\nserverProvider.RegisterService(new ServiceObject());\n\n// run serve async\nvar tokenSource = new CancellationTokenSource();\nawait serverProvider.ServeAsync(tokenSource.Token);\n```\n\n- Client Call Registry\n\n```cs\n// create a call registry instance \nvar callConnectionPool = new ReusableCallConnectionPool();\n// have to implementation your own CallRegistry instance\nvar webListenerCallRegistry = new WebListenerCallRegistry(callConnectionPool: callConnectionPool, prefixes: new[] { \"http://localhost:23333/ws/\" }));\n\n// enable remote register\nvar tokenSource = new CancellationTokenSource();\nwebListenerCallRegistry.RegisterRemoteSocket(tokenSource.Token);\n```\n\n- Client Call\n\n```cs\nvar result = callConnectionPool.CallAsync(namespace: \"namespace\", method: \"MethodName\", param: Encoding.UTF8.GetBytes(\"{param:0}\")).Result;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawatercolorpen%2Fholeoverhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawatercolorpen%2Fholeoverhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawatercolorpen%2Fholeoverhttp/lists"}