socket

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSocketConnection

func NewSocketConnection(address string) (*net.TCPConn, error)

NewSocketConnection connects to a TCP server at address and returns the TCP connection

func NewSocketListener

func NewSocketListener(port string) (*net.TCPListener, error)

NewSocketListener creates a Listener on a socket on a TCP socket port should be the port to listen to e.g. ":9999" pass the Listener to WaitForConnect

func WaitForSocketConnect

func WaitForSocketConnect(l *net.TCPListener) (*net.TCPConn, error)

WaitForSocketConnect waits for a client to connect to the TCP socket and returns the TCP connection There is no timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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