All Projects → bigwhite → Gocmpp

bigwhite / Gocmpp

Licence: apache-2.0
An implementation of China Mobile Peer to Peer protocol in golang for both client and server sides.

Programming Languages

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

Labels

Projects that are alternatives of or similar to Gocmpp

Purple
Official Rust implementation of the Purple Protocol
Stars: ✭ 85 (-21.3%)
Mutual labels:  protocol
Kafka Php
kafka php client
Stars: ✭ 1,340 (+1140.74%)
Mutual labels:  protocol
Pycomm3
A Python Ethernet/IP library for communicating with Allen-Bradley PLCs.
Stars: ✭ 102 (-5.56%)
Mutual labels:  protocol
Coq Serapi
Coq Protocol Playground with Se(xp)rialization of Internal Structures.
Stars: ✭ 87 (-19.44%)
Mutual labels:  protocol
Activitypub
A PHP implementation of ActivityPub protocol based upon the ActivityStreams 2.0 data format.
Stars: ✭ 94 (-12.96%)
Mutual labels:  protocol
Bitcoin in a nutshell
Книга о том, как действительно работает Bitcoin
Stars: ✭ 98 (-9.26%)
Mutual labels:  protocol
Ipfs Companion
Browser extension that simplifies access to IPFS resources on the web
Stars: ✭ 1,247 (+1054.63%)
Mutual labels:  protocol
Protocol Fcgi
FastCGI (FCGI) Protocol implementation for PHP
Stars: ✭ 106 (-1.85%)
Mutual labels:  protocol
Ice
WIP RFC 8445 ICE implementation in go
Stars: ✭ 95 (-12.04%)
Mutual labels:  protocol
Among Us Protocol
A writeup of the network protocol used in Among Us, a game by Innersloth.
Stars: ✭ 99 (-8.33%)
Mutual labels:  protocol
Node Webdollar
WebDollar Protocol - Currency of the Internet
Stars: ✭ 89 (-17.59%)
Mutual labels:  protocol
Federation
Python library for abstracting social federation protocols
Stars: ✭ 93 (-13.89%)
Mutual labels:  protocol
Kcp
⚡ KCP - A Fast and Reliable ARQ Protocol
Stars: ✭ 10,473 (+9597.22%)
Mutual labels:  protocol
Base Drafts
Internet-Drafts that make up the base QUIC specification
Stars: ✭ 1,270 (+1075.93%)
Mutual labels:  protocol
Redis Tools
my tools working with redis
Stars: ✭ 104 (-3.7%)
Mutual labels:  protocol
Arduino Robust Serial
A simple and robust serial communication protocol. It was designed for Arduino but can be used for other purposes (e.g. bluetooth, sockets). Implementation in C Arduino, C++, Python and Rust.
Stars: ✭ 83 (-23.15%)
Mutual labels:  protocol
Cuckoo
Boilerplate-free mocking framework for Swift!
Stars: ✭ 1,344 (+1144.44%)
Mutual labels:  protocol
Ot Node
OriginTrail network node
Stars: ✭ 107 (-0.93%)
Mutual labels:  protocol
Reverse Engineering Bluetooth Protocols
Intercepting Bluetooth device communication and simulating packet responses of an iPhone from a Raspberry Pi 3
Stars: ✭ 105 (-2.78%)
Mutual labels:  protocol
Mud
Multipath UDP library
Stars: ✭ 100 (-7.41%)
Mutual labels:  protocol

Build Status Coverage Status Go Report Card GoDoc

gocmpp

An implementation of China Mobile Peer to Peer(cmpp) protocol in golang for both client and server sides.

The protocol versions below are covered:

Overview

gocmpp is a library that implements China Mobile Peer to Peer(cmpp) protocol. You can use the lib to implement any app, tool or system that use cmpp protocol for both client and server side.

gocmpp is portable well. It can be used on linux, darwin or even windows.

gocmpp has covered cmpp2.x and cmpp3.x versions. It has supported the connect, submit, deliver, fwd, active test, and terminate packets of cmpp protocol. But other less use packets like cmpp query, cancel and route have not been supported. And they are not in the roadmap at all.

QuickStart

1. Download gocmpp

$go get github.com/bigwhite/gocmpp

2. Build gocmpp

gocmpp's build use the vendor mechanism introduced in go 1.5, so we need go 1.5 or later version to build it.

$export GO15VENDOREXPERIMENT="1"
$cd $GOPATH/src/github.com/bigwhite/gocmpp
$make
$make
go build -o examples/server/server examples/server/server.go
go build -o examples/client/client examples/client/client.go
go build
go build ./utils
go test
PASS
ok  	github.com/bigwhite/gocmpp	0.009s
go test ./utils
ok  	github.com/bigwhite/gocmpp/utils	0.008s

3. Run the examples

run the two programs below in order:

  • ./examples/server/server
  • ./examples/client/client

you would get the output like below:

server:

cmppserver: 2015/11/19 16:28:50 accept a connection from 127.0.0.1:49847
cmppserver: 2015/11/19 16:28:50 receive a cmpp30 connect request from 127.0.0.1:49847[0]
cmppserver: 2015/11/19 16:28:50 handleLogin: 900001 login ok
cmppserver: 2015/11/19 16:28:55 receive a cmpp active response from 127.0.0.1:49847[0]
cmppserver: 2015/11/19 16:29:00 receive a cmpp active response from 127.0.0.1:49847[1]
cmppserver: 2015/11/19 16:29:00 receive a cmpp30 submit request from 127.0.0.1:49847[1]
cmppserver: 2015/11/19 16:29:00 handleSubmit: handle submit from 900001 ok! msgid[12878564852733378560], srcId[900001], destTerminalId[13500002696]
cmppserver: 2015/11/19 16:29:05 receive a cmpp active response from 127.0.0.1:49847[2]
cmppserver: 2015/11/19 16:29:05 receive a cmpp30 submit request from 127.0.0.1:49847[2]
cmppserver: 2015/11/19 16:29:05 handleSubmit: handle submit from 900001 ok! msgid[12878564852733378560], srcId[900001], destTerminalId[13500002696]
cmppserver: 2015/11/19 16:29:10 receive a cmpp active response from 127.0.0.1:49847[3]
cmppserver: 2015/11/19 16:29:10 receive a cmpp30 submit request from 127.0.0.1:49847[3]
cmppserver: 2015/11/19 16:29:10 handleSubmit: handle submit from 900001 ok! msgid[12878564852733378560], srcId[900001], destTerminalId[13500002696]
cmppserver: 2015/11/19 16:29:13 close connection with 127.0.0.1:49847!

client:

2015/11/19 16:28:50 client connect and auth ok
2015/11/19 16:28:55 receive a cmpp active request: &{0}
2015/11/19 16:29:00 receive a cmpp active request: &{1}
2015/11/19 16:29:00 send a cmpp3 submit request
2015/11/19 16:29:00 receive a cmpp3 submit response: &{12878564852733378560 0 1}
2015/11/19 16:29:05 receive a cmpp active request: &{2}
2015/11/19 16:29:05 send a cmpp3 submit request
2015/11/19 16:29:05 receive a cmpp3 submit response: &{12878564852733378560 0 2}
2015/11/19 16:29:10 receive a cmpp active request: &{3}
2015/11/19 16:29:10 send a cmpp3 submit request
2015/11/19 16:29:10 receive a cmpp3 submit response: &{12878564852733378560 0 3}

4.How to use the library

The best start entry is the code in folder 'examples'.

  • client.go tells you how to use gocmpp in client side.
  • server.go presents you how to construct a cmpp server in gocmpp.

Who use gocmpp

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