socket

package
v0.0.0-...-ef7f9f6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Don't verify the server's cert, as we are not using the TLS PKI.
	TLSCfg = &tls.Config{InsecureSkipVerify: true, NextProtos: []string{"h3"}}
)

Functions

func InitSQUICCerts

func InitSQUICCerts() error

InitSQUICCerts reads certificate files from the os environment and Initializes the scion QUIC layer.

func InitScion

func InitScion(myAddr addr.IA) error

Types

type SCIONSocket

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

func NewSCIONSocket

func NewSCIONSocket() *SCIONSocket

func (*SCIONSocket) Accept

func (s *SCIONSocket) Accept() (net.Conn, error)

func (*SCIONSocket) Dial

func (s *SCIONSocket) Dial(addr string, index int) (net.Conn, error)

func (*SCIONSocket) Listen

func (s *SCIONSocket) Listen(addr string) (*net.Listener, error)

func (*SCIONSocket) Read

func (s *SCIONSocket) Read(bytes []byte) (int, error)

func (*SCIONSocket) Write

func (s *SCIONSocket) Write(bytes []byte) (int, error)

type Socket

type Socket interface {
	Listen(addr string) (*net.Listener, error)
	Dial(addr string, index int) (net.Conn, error)
	Read([]byte) (int, error)
	Write([]byte) (int, error)
	Accept() (net.Conn, error)
}

func NewSocket

func NewSocket(network string) Socket

type TCPSocket

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

func NewTCPSocket

func NewTCPSocket() *TCPSocket

func (*TCPSocket) Accept

func (s *TCPSocket) Accept() (net.Conn, error)

func (*TCPSocket) Dial

func (s *TCPSocket) Dial(addr string, index int) (net.Conn, error)

func (*TCPSocket) Listen

func (s *TCPSocket) Listen(addr string) (*net.Listener, error)

func (*TCPSocket) Read

func (s *TCPSocket) Read(bytes []byte) (int, error)

func (*TCPSocket) Write

func (s *TCPSocket) Write(bytes []byte) (int, error)

Jump to

Keyboard shortcuts

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