Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanishoss/dumby
A super simple and lightweight protocol :zap:
https://github.com/yanishoss/dumby
golang iot ipc protocol tcp
Last synced: 1 day ago
JSON representation
A super simple and lightweight protocol :zap:
- Host: GitHub
- URL: https://github.com/yanishoss/dumby
- Owner: yanishoss
- License: mit
- Created: 2018-08-22T17:55:12.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-08T16:47:10.000Z (about 6 years ago)
- Last Synced: 2024-06-20T06:23:22.920Z (5 months ago)
- Topics: golang, iot, ipc, protocol, tcp
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# :ram: Dumby
[![Build Status](https://travis-ci.org/yanishoss/dumby.svg?branch=master)](https://travis-ci.org/yanishoss/dumby)
[![Go Report Card](https://goreportcard.com/badge/github.com/yanishoss/dumby)](https://goreportcard.com/report/github.com/yanishoss/dumby)
[![GoDoc](https://godoc.org/github.com/yanishoss/dumby?status.svg)](https://godoc.org/github.com/yanishoss/dumby)
[![Coverage Status](https://coveralls.io/repos/github/yanishoss/dumby/badge.svg?branch=master)](https://coveralls.io/github/yanishoss/dumby?branch=master)> Dumby is a super lightweight and fast protocol
## :satellite: How to download ?
```shell
$ go get -u github.com/yanishoss/dumby/...
```## :electric_plug: How to use ?
```golang
/*In this file, we are going to create a simple Dumby server.
It will print the client's message and reply back.Go ahead, even a Dumb can do that!
*/
package main
import (
"fmt""github.com/yanishoss/dumby/protocol"
"github.com/yanishoss/dumby/server"
)const (
// The address the server will listen to
host = "localhost:8080"actionHello = iota + 2
)func main() {
s := server.New(&server.Config{
MaxConnections: 5000,
})s.AddHandlers(actionHello, func(trame *protocol.Trame, s chan<- *protocol.Trame) {
// Print the message sent by the client
fmt.Println("Someone says: ", string(trame.Payload))// Respond back with a message
s <- protocol.New(trame.Session, actionHello, []byte("Hello my friend! Is Dumby the best protocol on this world ?"))
})s.Listen(host)
// So it's not difficult, right ?
}
```
**You did it** :clap:[See more example](./example "Examples")
## :heart: Contributing
**You want to contribute ?**
Take a look at [our next projects](https://github.com/yanishoss/dumby/projects "Projects") and pick a task up !
The community **worships you** :clap:## :running: Yet to come
* A simple client
* A more robust server implementation