Categorygithub.com/funcards/engine.io-parser/v4
package
4.0.0-20220513212218-27624224a21c
Repository: https://github.com/funcards/engine.io-parser.git
Documentation: pkg.go.dev

# README

engine.io-parser

workflow Coverage Status GoDoc License

This is the GO parser version 4 for the engine.io protocol encoding.

Installation

Use go get.

go get github.com/funcards/engine.io-parser/v4

Then import the parser package into your own code.

import "github.com/funcards/engine.io-parser/v4"

How to use

The parser can encode/decode packets, payloads and payloads as binary.

Example:

payload := eiop.Payload{
    {Type: eiop.Open},
    {Type: eiop.Close},
    {Type: eiop.Ping, Data: "probe"},
    {Type: eiop.Pong, Data: "probe"},
    {Type: eiop.Message, Data: "test"},
}
encoded := payload.Encode(&buf)
fmt.Println(encoded.(string))

payload1 = eiop.DecodePayload(encoded) // payload == payload1

License

Distributed under MIT License, please see license file within the code for more details.