sqnet

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

sqnet (scion-quic-net)

minimal wrappers around scion pan and quic to satisfy net.Listener and net.Conn

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerTLSDummyCfg = &tls.Config{
		Certificates: quicutil.MustGenerateSelfSignedCert(),
		NextProtos:   []string{"hello-quic"},
	}
	ClientTLSDummyCfg = &tls.Config{
		InsecureSkipVerify: true,
		NextProtos:         []string{"hello-quic"},
	}
)

Functions

func DialAddr

func DialAddr(remote pan.UDPAddr) (net.Conn, error)

DialAddr returns a SCION QUIC connection that implements net.Conn

func DialContextAddr

func DialContextAddr(ctx context.Context, remote pan.UDPAddr) (net.Conn, error)

DialContextAddr returns a SCION QUIC connection that implements net.Conn

func DialContextString

func DialContextString(ctx context.Context, remote string) (net.Conn, error)

DialContextString returns a SCION QUIC connection that implements net.Conn

func DialQUIC

func DialQUIC(ctx context.Context, local netaddr.IPPort, remote pan.UDPAddr, policy pan.Policy, selector pan.Selector, host string, tlsConf *tls.Config, quicConf *quic.Config) (net.Conn, error)

DialQUIC returns a SCION QUIC connection that implements net.Conn

func DialString

func DialString(remote string) (net.Conn, error)

DialString returns a SCION QUIC connection that implements net.Conn

func ListenIPPort

func ListenIPPort(addr netaddr.IPPort) (net.Listener, error)

ListenIPPort returns a SCION QUIC listener struct that implements net.Listener

func ListenPort

func ListenPort(port uint16) (net.Listener, error)

ListenPort returns a SCION QUIC listener struct that implements net.Listener

func ListenQUIC

func ListenQUIC(ctx context.Context, addr netaddr.IPPort, selector pan.ReplySelector, tlsCfg *tls.Config, qconf *quic.Config) (net.Listener, error)

ListenQUIC returns a SCION QUIC listener struct that implements net.Listener

func ListenString

func ListenString(addr string) (net.Listener, error)

ListenString returns a SCION QUIC listener struct that implements net.Listener

Types

type Conn

type Conn struct {
	quic.Session
	quic.Stream
}

Conn implements net.Conn

func (*Conn) Close

func (q *Conn) Close() error

Close required to implement net.Conn

func (*Conn) LocalAddr

func (q *Conn) LocalAddr() net.Addr

LocalAddr required to implement net.Conn

func (*Conn) Read

func (q *Conn) Read(b []byte) (int, error)

Read implements net.Conn.Read

func (*Conn) RemoteAddr

func (q *Conn) RemoteAddr() net.Addr

RemoteAddr required to implement net.Conn

func (*Conn) SetDeadline

func (q *Conn) SetDeadline(t time.Time) error

SetDeadline required to implement net.Conn

func (*Conn) SetReadDeadline

func (q *Conn) SetReadDeadline(t time.Time) error

SetReadDeadline required to implement net.Conn

func (*Conn) SetWriteDeadline

func (q *Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline required to implement net.Conn

func (*Conn) Write

func (q *Conn) Write(b []byte) (int, error)

Write required to implement net.Conn

Jump to

Keyboard shortcuts

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