network

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Close() error
	Send(message.Message) error
	Inbox() <-chan message.Message
	IsAlive() bool
	RemoteAddress() net.Addr
}

Connection defines the interface for interacting with a network connection.

func NewClientConnection

func NewClientConnection(conn net.Conn, l *slog.Logger) Connection

NewClientConnection configures and returns a connection for the client side.

func NewServerConnection

func NewServerConnection(conn net.Conn, l *slog.Logger) Connection

NewServerConnection configures and returns a connection for the server side.

Jump to

Keyboard shortcuts

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