All Projects → ldcsaa → Hp Socket

ldcsaa / Hp Socket

Licence: other
High Performance TCP/UDP/HTTP Communication Component

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Hp Socket

RRQMSocket
TouchSocket是.Net(包括 C# 、VB.Net、F#)的一个整合性的、超轻量级的网络通信框架。包含了 tcp、udp、ssl、http、websocket、rpc、jsonrpc、webapi、xmlrpc等一系列的通信模块。一键式解决 TCP 黏分包问题,udp大数据包分片组合问题等。使用协议模板,可快速实现「固定包头」、「固定长度」、「区间字符」等一系列的数据报文解析。
Stars: ✭ 286 (-93.53%)
Mutual labels:  socket, tcp, https, udp, iocp
Elixir Socket
Socket wrapping for Elixir.
Stars: ✭ 642 (-85.48%)
Mutual labels:  tcp, socket, udp, ssl
Yasio
A multi-platform support c++11 library with focus on asio (asynchronous socket I/O) for any client application.
Stars: ✭ 483 (-89.07%)
Mutual labels:  tcp, socket, udp, ssl
Beetlex
high performance dotnet core socket tcp communication components, support TLS, HTTP, HTTPS, WebSocket, RPC, Redis protocols, custom protocols and 1M connections problem solution
Stars: ✭ 802 (-81.86%)
Mutual labels:  tcp, socket, ssl, https
Networker
A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
Stars: ✭ 408 (-90.77%)
Mutual labels:  networking, tcp, udp, netcore
Zeus
A high performance, cross-platform Internet Communication Engine. Developed with native socket API. Aim at handling millions of concurrent connections.
Stars: ✭ 30 (-99.32%)
Mutual labels:  tcp, socket, epoll, cross-platform
Zserver4d
ZServer4D 是一套从商业项目剥离而出的云服务器中间件,可以承载百万级的分布式负载服务,并且支持IoT及内网穿透
Stars: ✭ 199 (-95.5%)
Mutual labels:  network, tcp, socket, epoll
Kalm.js
The socket manager
Stars: ✭ 155 (-96.49%)
Mutual labels:  network, tcp, socket, udp
Netlink
Socket and Networking Library using msgpack.org[C++11]
Stars: ✭ 197 (-95.54%)
Mutual labels:  networking, tcp, udp, cross-platform
Packetsender
Network utility for sending / receiving TCP, UDP, SSL
Stars: ✭ 1,349 (-69.48%)
Mutual labels:  tcp, udp, cross-platform, ssl
Litenetlib
Lite reliable UDP library for Mono and .NET
Stars: ✭ 2,179 (-50.7%)
Mutual labels:  network, networking, udp, cross-platform
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (-95.11%)
Mutual labels:  network, tcp, socket, udp
socket
Dazzle Async Socket
Stars: ✭ 19 (-99.57%)
Mutual labels:  socket, tcp, udp
Socket
The Hoa\Socket library.
Stars: ✭ 61 (-98.62%)
Mutual labels:  socket, tcp, udp
epoller
epoll implementation for connections in Linux, MacOS and Windows
Stars: ✭ 58 (-98.69%)
Mutual labels:  socket, tcp, epoll
KingNetwork
KingNetwork is an open source library to facilitate the creation and communication of clients and servers via TCP, UDP, WebSocket and RUDP sockets.
Stars: ✭ 78 (-98.24%)
Mutual labels:  socket, tcp, udp
Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (-98.48%)
Mutual labels:  socket, tcp, udp
DatagramTunneler
Simple C++ cross-platform client/server app forwarding UDP datagrams through a TCP connection.
Stars: ✭ 116 (-97.38%)
Mutual labels:  socket, tcp, udp
Stubmatic
Mock HTTP calls without coding. Designed specially for testing and testers.
Stars: ✭ 118 (-97.33%)
Mutual labels:  ssl, tcp, https
Tiginx
Tiginx is a Shanzhai Nginx project , please buyao use it xian , if meet problem , I no fuze ...
Stars: ✭ 29 (-99.34%)
Mutual labels:  socket, tcp, epoll

HP-Socket

High Performance Network Framework

Description

  • Server Based on IOCP/EPOLL communication model, combined with technology of memory pool, private heap etc., efficient memory management is implemented to support large scale and high concurrent communication scenarios.
  • Agent The Agent component is essentially a Multi-Client component that uses the same technical architecture as the Server component. An Agent component object can create and efficiently handle large-scale Socket connections at the same time.
  • Client Based on Event-Select/POLL communication model, each component object creates a communication thread and manages a Socket connection. Client components are suitable for small-scale client scenarios.

Document

  • HP-Socket Development Guide [pdf]
  • HP-Socket Class Diagram [uml]
  • HP-Socket Class Diagram [jpg]
  • HP-Socket SSL Class Diagram [jpg]
  • HP-Socket HTTP Class Diagram [jpg]

Workflow

  1. Create listener object
  2. Create component object (and binding with listener object)
  3. Start component object
  4. Connect to dest host (for Agent Component only)
  5. process network events (OnConnect/OnReceive/OnClose etc.)
  6. Stop component object (optional: component object will be stopped before destroy in step 7)
  7. Destroy component object
  8. Destroy listener object

Agent Workflow

Example

  • C++ Example
#include <hpsocket/HPSocket.h>

/* Listener Class */
class CListenerImpl : public CTcpPullServerListener
{

public:
	// 5. process network events
	virtual EnHandleResult OnPrepareListen(ITcpServer* pSender, SOCKET soListen);
	virtual EnHandleResult OnAccept(ITcpServer* pSender, CONNID dwConnID, UINT_PTR soClient);
	virtual EnHandleResult OnHandShake(ITcpServer* pSender, CONNID dwConnID);
	virtual EnHandleResult OnReceive(ITcpServer* pSender, CONNID dwConnID, int iLength);
	virtual EnHandleResult OnSend(ITcpServer* pSender, CONNID dwConnID, const BYTE* pData, int iLength);
	virtual EnHandleResult OnClose(ITcpServer* pSender, CONNID dwConnID, EnSocketOperation enOperation, int iErrorCode);
	virtual EnHandleResult OnShutdown(ITcpServer* pSender);
};

int main(int argc, char* const argv[])
{
	// 1. Create listener object
	CListenerImpl s_listener;
	// 2. Create component object (and binding with listener object)
	CTcpPullServerPtr s_pserver(&s_listener);
	
	// 3. Start component object
	if(!s_pserver->Start("0.0.0.0", 5555))
		exit(1);
	
	/* wait for exit */
	// ... ... 
	
	// 6. (optional) Stop component object
	s_pserver->Stop();

	return 0;
	
	// 7. Destroy component object automatically
	// 8. Destroy listener object automatically
}
  • C Example
#include <hpsocket/HPSocket4C.h>

// 5. process network events
EnHandleResult __HP_CALL OnConnect(HP_Agent pSender, HP_CONNID dwConnID);
EnHandleResult __HP_CALL OnReceive(HP_Agent pSender, HP_CONNID dwConnID, int iLength);
EnHandleResult __HP_CALL OnSend(HP_Agent pSender, HP_CONNID dwConnID, const BYTE* pData, int iLength);
EnHandleResult __HP_CALL OnClose(HP_Agent pSender, HP_CONNID dwConnID, En_HP_SocketOperation enOperation, int iErrorCode);
EnHandleResult __HP_CALL OnShutdown(HP_Agent pSender);

int main(int argc, char* const argv[])
{
	HP_TcpPullAgentListener s_listener;
	HP_TcpPullAgent s_agent;

	// 1. Create listener object
	s_listener = ::Create_HP_TcpPullAgentListener();
	// 2. Create component object (and binding with listener object)
	s_agent    = ::Create_HP_TcpPullAgent(s_listener);
	
	/* Set listener callbacks */
	::HP_Set_FN_Agent_OnConnect(s_listener, OnConnect);
	::HP_Set_FN_Agent_OnSend(s_listener, OnSend);
	::HP_Set_FN_Agent_OnPullReceive(s_listener, OnReceive);
	::HP_Set_FN_Agent_OnClose(s_listener, OnClose);
	::HP_Set_FN_Agent_OnShutdown(s_listener, OnShutdown);
	
	// 3. Start component object
	if(!::HP_Agent_Start(s_agent, "0.0.0.0", TRUE))
		exit(1);
	
	// 4. Connect to dest host
	::HP_Agent_Connect(s_agent, REMOTE_HOST_1, REMOTE_PORT_1, nullptr);
	::HP_Agent_Connect(s_agent, REMOTE_HOST_2, REMOTE_PORT_2, nullptr);
	::HP_Agent_Connect(s_agent, REMOTE_HOST_3, REMOTE_PORT_3, nullptr);
	
	/* wait for exit */
	// ... ... 
	
	// 6. (optional) Stop component object
	::HP_Agent_Stop(s_agent);

	// 7. Destroy component object
	::Destroy_HP_TcpPullAgent(s_agent);
	// 8. Destroy listener object
	::Destroy_HP_TcpPullAgentListener(s_listener);
	
	return 0;
}

Component List

  • Basic Components

Basic Component

  • SSL Components

SSL Component

  • HTTP Components

HTTP COmponent

Reference Projects

Extension Projects

Technical Exchange Groups

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].