...

Package socket

import "github.com/gonitro/nitro/app/network/socket"
Overview
Index

Overview ▾

Package socket provides a net socket network

func NewTransport

func NewTransport(opts ...network.Option) network.Transport

type Client

type Client struct {
    // contains filtered or unexported fields
}

func (*Client) Close

func (t *Client) Close() error

func (*Client) Local

func (t *Client) Local() string

func (*Client) Recv

func (t *Client) Recv(m *network.Message) error

func (*Client) Remote

func (t *Client) Remote() string

func (*Client) Send

func (t *Client) Send(m *network.Message) error

type Listener

type Listener struct {
    // contains filtered or unexported fields
}

func (*Listener) Accept

func (t *Listener) Accept(fn func(network.Socket)) error

func (*Listener) Addr

func (t *Listener) Addr() string

func (*Listener) Close

func (t *Listener) Close() error

type Socket

type Socket struct {
    // contains filtered or unexported fields
}

func (*Socket) Close

func (t *Socket) Close() error

func (*Socket) Local

func (t *Socket) Local() string

func (*Socket) Recv

func (t *Socket) Recv(m *network.Message) error

func (*Socket) Remote

func (t *Socket) Remote() string

func (*Socket) Send

func (t *Socket) Send(m *network.Message) error