All Projects → monochromegane → Smux

monochromegane / Smux

Licence: mit
smux is a socket multiplexer written in Golang. It provides fast communication by efficiently a single connection.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Smux

Tcpraw
Sending packets through TCP
Stars: ✭ 86 (-11.34%)
Mutual labels:  tcp, socket
T Io
解决其它网络框架没有解决的用户痛点,让天下没有难开发的网络程序
Stars: ✭ 1,331 (+1272.16%)
Mutual labels:  tcp, socket
Bigq
Messaging platform in C# for TCP and Websockets, with or without SSL
Stars: ✭ 18 (-81.44%)
Mutual labels:  tcp, socket
Elixir Socket
Socket wrapping for Elixir.
Stars: ✭ 642 (+561.86%)
Mutual labels:  tcp, socket
Veza
IPC/TCP Networking Utility to connect several processes with great concurrency.
Stars: ✭ 45 (-53.61%)
Mutual labels:  tcp, socket
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 (+726.8%)
Mutual labels:  tcp, socket
Zeus
A high performance, cross-platform Internet Communication Engine. Developed with native socket API. Aim at handling millions of concurrent connections.
Stars: ✭ 30 (-69.07%)
Mutual labels:  tcp, socket
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+4456.7%)
Mutual labels:  tcp, socket
Cocoaasyncsocket demo
基于AsyncSocket搭建即时通讯体系 . 包含TCP连接 , 消息发送 , 消息接收 , 心跳处理 ,断网重连 , 消息超时 , 消息分发 , 数据库结构设计 , 消息丢失等 . 以及UI设计, 文本表情消息/语音消息/图片消息/视频消息/文件消息/撤回消息/提示语消息的实现思路讲解
Stars: ✭ 981 (+911.34%)
Mutual labels:  tcp, socket
Godsharp.socket
An easy-to-use .NET socket server and client.
Stars: ✭ 35 (-63.92%)
Mutual labels:  tcp, socket
Yasio
A multi-platform support c++11 library with focus on asio (asynchronous socket I/O) for any client application.
Stars: ✭ 483 (+397.94%)
Mutual labels:  tcp, socket
Netty Stroll
RPC基础通信框架
Stars: ✭ 77 (-20.62%)
Mutual labels:  tcp, socket
Bizsocket
异步socket,对一些业务场景做了支持
Stars: ✭ 469 (+383.51%)
Mutual labels:  tcp, socket
Asyncrat C Sharp
Open-Source Remote Administration Tool For Windows C# (RAT)
Stars: ✭ 819 (+744.33%)
Mutual labels:  tcp, socket
Networksocket
NetworkSocket是一个以中间件(middleware)扩展通讯协议,以插件(plug)扩展服务器功能的支持SSL安全传输的通讯框架;目前支持http、websocket、fast、flex策略与silverlight策略协议。
Stars: ✭ 435 (+348.45%)
Mutual labels:  tcp, socket
Tinytcpserver
A small tcp server working under Mono or .NET (4.0) and provides hooks for handling data exchange with clients (works under mono and .net). Behaviour/protocol/reaction could be specified via custom C# script.
Stars: ✭ 14 (-85.57%)
Mutual labels:  tcp, socket
Netcat
💻 Netcat client and server modules written in pure Javascript for Node.js.
Stars: ✭ 315 (+224.74%)
Mutual labels:  tcp, socket
Saea
SAEA.Socket is a high-performance IOCP framework TCP based on dotnet standard 2.0; Src contains its application test scenarios, such as websocket,rpc, redis driver, MVC WebAPI, lightweight message server, ultra large file transmission, etc. SAEA.Socket是一个高性能IOCP框架的 TCP,基于dotnet standard 2.0;Src中含有其应用测试场景,例如websocket、rpc、redis驱动、MVC WebAPI、轻量级消息服务器、超大文件传输等
Stars: ✭ 318 (+227.84%)
Mutual labels:  tcp, socket
Goridge
High-performance PHP-to-Golang IPC bridge
Stars: ✭ 950 (+879.38%)
Mutual labels:  tcp, socket
Easychatandroidclient
EasyChat是一个开源的社交类的App。主要包含消息、好友、群组等相关的IM核心功能。部分界面参照了QQ、微信等相关社交APP。EasyChat APP整体采用MVVM模式,基于JetPack(Lifecycle,LiveData,ViewModel,Room)构建
Stars: ✭ 64 (-34.02%)
Mutual labels:  tcp, socket

smux Build Status

smux is a socket multiplexer. smux multiplexes one connection with a virtual channel called a stream. It behaves like a very simple HTTP/2 binary framing layer, but it reduces protocol overhead.

smux sends and receives multiple requests and responses in parallel using a single connection. Therefore, our application will be fast and simple.

Usage

smux provides simple server and client.

// smux server
server := smux.Server{
	Network: "tcp", // or "unix"
	Address: "localhost:3000", // or "sockfile"
        Handler: smux.HandlerFunc(func(w io.Writer, r io.Reader) {
                io.Copy(ioutil.Discard, r)
		fmt.Fprint(w, "Hello, smux client!")
        }),
}

server.ListenAndServe()
// smux client
client := smux.Client{
	Network: "tcp", // or "unix"
	Address: "localhost:3000", // or "sockfile"
}

body, _ := client.Post([]byte("Hello, smux server!"))
fmt.Printf("%s\n", body) // "Hello, smux client!"

And smux provides raw level interface (stream.Write and Read). You can learn from client and server code.

Performance

Benchmark for HTTP, smux, and similar implementation.

benchmark

Benchmark script is here. It runs on MacBook Pro (15-inch, 2017), CPU 2.8 GHz Intel Core i7, memory 16 GB. Go version is go1.10.2 darwin/amd64.

Currently, xtaci/smux (ssmux) is fast. I am currently speeding up my smux !

License

MIT

Author

monochromegane

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