All Projects → lvgithub → Stick

lvgithub / Stick

Licence: mit
solution of "sticking packets" for TCP network transmission

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Stick

Hisocket
It is a lightweight client socket solution, you can used it in C# project or Unity3d
Stars: ✭ 275 (+5.36%)
Mutual labels:  bytes, tcp, socket, net
Netcat
💻 Netcat client and server modules written in pure Javascript for Node.js.
Stars: ✭ 315 (+20.69%)
Mutual labels:  tcp, socket, net
nc
Porting Netcat in Node.js. CLI util. 💻
Stars: ✭ 17 (-93.49%)
Mutual labels:  tcp, net
net-Socket
A minimalist wrapper around System.Net.Sockets.Socket.
Stars: ✭ 21 (-91.95%)
Mutual labels:  socket, tcp
Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (-74.33%)
Mutual labels:  socket, tcp
DzSocket
Delphi Client/Server components to communicate using TCP Socket Asynchronous easily
Stars: ✭ 44 (-83.14%)
Mutual labels:  socket, tcp
socket.engine
A robot communication engine
Stars: ✭ 34 (-86.97%)
Mutual labels:  socket, tcp
SocketIOUnity
A Wrapper for socket.io-client-csharp to work with Unity.
Stars: ✭ 69 (-73.56%)
Mutual labels:  socket, tcp
tcp-net
Build tcp applications in a stable and elegant way
Stars: ✭ 42 (-83.91%)
Mutual labels:  socket, tcp
Tiginx
Tiginx is a Shanzhai Nginx project , please buyao use it xian , if meet problem , I no fuze ...
Stars: ✭ 29 (-88.89%)
Mutual labels:  socket, tcp
EasyFileTransfer
An easy way to transfer file with any size on network with tcp protocol.
Stars: ✭ 30 (-88.51%)
Mutual labels:  socket, tcp
ddos
Simple dos attack utility
Stars: ✭ 36 (-86.21%)
Mutual labels:  socket, tcp
socket
Dazzle Async Socket
Stars: ✭ 19 (-92.72%)
Mutual labels:  socket, tcp
Socket
The Hoa\Socket library.
Stars: ✭ 61 (-76.63%)
Mutual labels:  socket, tcp
workerman
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.4.
Stars: ✭ 10,005 (+3733.33%)
Mutual labels:  socket, tcp
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 (-70.11%)
Mutual labels:  socket, tcp
epoller
epoll implementation for connections in Linux, MacOS and Windows
Stars: ✭ 58 (-77.78%)
Mutual labels:  socket, tcp
socket-chat
This project will help you build a chat app by using the Socket IO library.
Stars: ✭ 36 (-86.21%)
Mutual labels:  socket, tcp
LiteNetwork
A simple and fast .NET networking library compatible with .NET Standard 2, .NET 5, 6 and 7.
Stars: ✭ 66 (-74.71%)
Mutual labels:  socket, tcp
RRQMSocket
TouchSocket是.Net(包括 C# 、VB.Net、F#)的一个整合性的、超轻量级的网络通信框架。包含了 tcp、udp、ssl、http、websocket、rpc、jsonrpc、webapi、xmlrpc等一系列的通信模块。一键式解决 TCP 黏分包问题,udp大数据包分片组合问题等。使用协议模板,可快速实现「固定包头」、「固定长度」、「区间字符」等一系列的数据报文解析。
Stars: ✭ 286 (+9.58%)
Mutual labels:  socket, tcp

issues forks stars linces npm david downloads

🌈 Introduction

我们使用 TCP 通信的时候,由于TCP是面向流的,因此需要对流进行解析。也就是所谓的拆包,把流解析为一段段我们所需要的数据。本方案为 Node.Js 实现的一个处理方案。

对要发送的数据按协议编码,把数据 data 分为 header +body两部分,header 默认固定长度(2 byte),header描述的是 body 数据的长度。由于header定长,因此可以通过header,解析出 body 的内容。

默认 header 我们使用 2 Byte 的存储空间,即Int16最大表示的 body 长度为 32767,也就是16M

Schematic

如上图,我们看先取出数据流的前两位,读取到内容 0x00, 0x02转化为整数的长度是 2,再读取出body第3、4位 0x61, 0x62

Links

🌈 Install

👀 Getting Started

😊 API Reference

😸 Examples

🌍 Solve the problem of "sticking packets" for TCP network transmission (Classic)

Other Language

现实场景中客户端是其他语言编写的比如C语言运行在单片机上,这时候大家可以基原理图自行打包,规则所示:

data = header(body.length) + body

License

MIT

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].