message

package
v0.0.0-...-e0ea44e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMessage

type AuthMessage struct {
	ID     string `json:"id"`
	Secret string `json:"secret"`
}

AuthMessage is the struct sent by the server on the first connection

func (*AuthMessage) SendResponse

func (a *AuthMessage) SendResponse(c *websocket.Conn) error

SendResponse send the ready response to the node to initiate the communication

type Message

type Message struct {
	Content []byte
}

Message contains the Ethereum message

func (*Message) GetType

func (e *Message) GetType() (string, error)

GetType return the type of the message sent by the Ethereum node

func (*Message) GetValue

func (e *Message) GetValue() ([]byte, error)

GetValue retrieve the current content of the emitted message by the node

type NodePing

type NodePing struct {
	ID   string `json:"id"`
	Time string `json:"clientTime"`
}

NodePing contains the last time the node is alive

func (*NodePing) SendResponse

func (n *NodePing) SendResponse(c *websocket.Conn) error

SendResponse send the pong response to the node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL