Run NodesReferencewarp

socket

Package socket

import "github.com/luxfi/node/warp/socket"

Types

Client

Client is a read-only connection to a socket

func Dial(addr string) (*Client, error)
func (c *Client) Close() error
func (c *Client) Recv() ([]byte, error)
func (c *Client) SetMaxMessageSize(s int64)

Socket

Socket manages sending messages over a socket to many subscribed clients

func NewSocket(addr string, log log.Logger) *Socket
func (s *Socket) Close() error
func (s *Socket) Listen() error
func (s *Socket) Running() bool
func (s *Socket) Send(msg []byte)