About

Get Started

Docs

net

import "github.com/gosolid/solid/pkg/runtime/net"

Index

Variables

var ErrInvalidNet = errors.New("receiver does not implement net.Net")

type Address

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

func NewAddress

func NewAddress(in isolates.FunctionArgs) (*Address, error)

func (*Address) Address

func (a *Address) Address() string

func (*Address) Family

func (a *Address) Family() string

func (*Address) Port

func (a *Address) Port() int

func (*Address) V8GetAddress

func (a *Address) V8GetAddress(in isolates.GetterArgs) (*isolates.Value, error)

func (*Address) V8GetFamily

func (a *Address) V8GetFamily(in isolates.GetterArgs) (*isolates.Value, error)

func (*Address) V8GetPort

func (a *Address) V8GetPort(in isolates.GetterArgs) (*isolates.Value, error)

type HostNetOptions

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

func NewHostNetOptions

func NewHostNetOptions(in isolates.FunctionArgs) (*HostNetOptions, error)

func (*HostNetOptions) Listen

func (n *HostNetOptions) Listen(in isolates.FunctionArgs, server Server, network string, address string) (Listener, error)

func (*HostNetOptions) V8FuncListen

func (n *HostNetOptions) V8FuncListen(in isolates.FunctionArgs) (*isolates.Value, error)

type HostSocketOptions

type HostSocketOptions struct {
    *stream.ReadWriteCloser
    // contains filtered or unexported fields
}

func NewHostSocketOptions

func NewHostSocketOptions(in isolates.FunctionArgs) (*HostSocketOptions, error)

func (*HostSocketOptions) Final

func (c *HostSocketOptions) Final(in isolates.FunctionArgs, this stream.Writable, callback *isolates.Value) error

func (*HostSocketOptions) LocalAddress

func (c *HostSocketOptions) LocalAddress(ctx context.Context, this *SocketBase) (*Address, error)

func (*HostSocketOptions) RemoteAddress

func (c *HostSocketOptions) RemoteAddress(ctx context.Context, this *SocketBase) (*Address, error)

func (*HostSocketOptions) V8FuncFinal

func (c *HostSocketOptions) V8FuncFinal(in isolates.FunctionArgs) (*isolates.Value, error)

func (*HostSocketOptions) V8FuncLocalAddress

func (c *HostSocketOptions) V8FuncLocalAddress(in isolates.FunctionArgs) (*isolates.Value, error)

func (*HostSocketOptions) V8FuncRemoteAddress

func (c *HostSocketOptions) V8FuncRemoteAddress(in isolates.FunctionArgs) (*isolates.Value, error)

type Listener

type Listener interface {
    Close(ctx context.Context) error
    Address(ctx context.Context) (*Address, error)
}

type Net

type Net interface {
    Server() *isolates.Value
    Socket() *isolates.Value
    Listen(ctx context.Context, server Server, network string, address string) (*isolates.Value, error)
}

type NetBase

type NetBase struct {
    This *isolates.Value
    // contains filtered or unexported fields
}

func NewHostNet

func NewHostNet(ctx context.Context) (*NetBase, error)

func NewNet

func NewNet(in isolates.FunctionArgs) (*NetBase, error)

func (*NetBase) Listen

func (n *NetBase) Listen(ctx context.Context, server Server, network, address string) (*isolates.Value, error)

func (*NetBase) Server

func (n *NetBase) Server() *isolates.Value

func (*NetBase) Socket

func (n *NetBase) Socket() *isolates.Value

type Server

type Server interface {
    events.EventEmitter
    Listener
    Net() Net
}

type ServerBase

type ServerBase struct {
    *events.EventEmitterBase
    // contains filtered or unexported fields
}

func (*ServerBase) Address

func (s *ServerBase) Address(ctx context.Context) (*Address, error)

func (*ServerBase) Close

func (s *ServerBase) Close(ctx context.Context) error

func (*ServerBase) Listen

func (s *ServerBase) Listen(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) Listener

func (s *ServerBase) Listener() *isolates.Value

func (*ServerBase) Net

func (s *ServerBase) Net() Net

func (*ServerBase) V8FuncAddress

func (s *ServerBase) V8FuncAddress(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8FuncClose

func (s *ServerBase) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8FuncListen

func (s *ServerBase) V8FuncListen(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8Get\_listener

func (s *ServerBase) V8Get_listener(in isolates.GetterArgs) (*isolates.Value, error)

type Socket

type Socket interface {
    stream.Duplex
}

type SocketBase

type SocketBase struct {
    *stream.DuplexBase
}

func (*SocketBase) Address

func (s *SocketBase) Address(ctx context.Context) (*Address, error)

func (*SocketBase) LocalAddress

func (s *SocketBase) LocalAddress(ctx context.Context) (*string, error)

func (*SocketBase) LocalFamily

func (s *SocketBase) LocalFamily(ctx context.Context) (*string, error)

func (*SocketBase) LocalPort

func (s *SocketBase) LocalPort(ctx context.Context) (*int, error)

func (*SocketBase) RemoteAddress

func (s *SocketBase) RemoteAddress(ctx context.Context) (*string, error)

func (*SocketBase) RemoteFamily

func (s *SocketBase) RemoteFamily(ctx context.Context) (*string, error)

func (*SocketBase) RemotePort

func (s *SocketBase) RemotePort(ctx context.Context) (*int, error)

func (*SocketBase) SetNoDelay

func (s *SocketBase) SetNoDelay(ctx context.Context) error

func (*SocketBase) SetTimeout

func (s *SocketBase) SetTimeout(ctx context.Context) error

func (*SocketBase) V8FuncAddress

func (s *SocketBase) V8FuncAddress(in isolates.FunctionArgs) (*isolates.Value, error)

func (*SocketBase) V8FuncSetNoDelay

func (s *SocketBase) V8FuncSetNoDelay(in isolates.FunctionArgs) (*isolates.Value, error)

func (*SocketBase) V8FuncSetTimeout

func (s *SocketBase) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)

func (*SocketBase) V8GetLocalAddress

func (s *SocketBase) V8GetLocalAddress(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetLocalFamily

func (s *SocketBase) V8GetLocalFamily(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetLocalPort

func (s *SocketBase) V8GetLocalPort(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetRemoteAddress

func (s *SocketBase) V8GetRemoteAddress(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetRemoteFamily

func (s *SocketBase) V8GetRemoteFamily(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetRemotePort

func (s *SocketBase) V8GetRemotePort(in isolates.GetterArgs) (*isolates.Value, error)

Up next

os