Sockets

package
v0.942.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(host *string, port *string) (net.Listener, error)

func Connect

func Connect(host *string, port *string) (net.Conn, error)

func CreateCertificate

func CreateCertificate(template *x509.Certificate) ([]byte, *rsa.PrivateKey, error)

func CreateMasterSlaveCertificateTemplate

func CreateMasterSlaveCertificateTemplate() *x509.Certificate

func CreateMasterTLSConfiguration

func CreateMasterTLSConfiguration() (*tls.Config, error)

func CreateSlaveTLSConfiguration

func CreateSlaveTLSConfiguration() (*tls.Config, error)

func CreateSocketConnectionReaderWriter

func CreateSocketConnectionReaderWriter(connection net.Conn) (*bufio.Reader, *bufio.Writer)

func CreateTLSConfiguration

func CreateTLSConfiguration(template *x509.Certificate) (*tls.Config, error)

func GetIPv6

func GetIPv6(rawIPv6Host []byte) string

func Receive

func Receive(connectionReader *bufio.Reader, bufferSize int) (int, []byte, error)

func Send

func Send(connectionWriter *bufio.Writer, data *[]byte) (int, error)

func TLSConnect

func TLSConnect(host *string, port *string, configuration *tls.Config) (net.Conn, error)

func UpgradeClientToTLS

func UpgradeClientToTLS(connection net.Conn, configuration *tls.Config) net.Conn

func UpgradeServerToTLS

func UpgradeServerToTLS(connection net.Conn, configuration *tls.Config) net.Conn

Types

This section is empty.

Jump to

Keyboard shortcuts

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