connect

package
v0.0.0-...-64e9426 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSL_REQUEST_CODE int32 = 80877103

	/* SSL Responses */
	SSL_ALLOWED     byte = 'S'
	SSL_NOT_ALLOWED byte = 'N'

	/* SSL Modes */
	SSL_MODE_REQUIRE     string = "require"
	SSL_MODE_VERIFY_CA   string = "verify-ca"
	SSL_MODE_VERIFY_FULL string = "verify-full"
	SSL_MODE_DISABLE     string = "disable"
)

SSL constants.

Variables

This section is empty.

Functions

func AuthenticateClient

func AuthenticateClient(client net.Conn, message []byte, length int) (bool, error)

AuthenticateClient - Establish and authenticate client connection to the backend.

This function simply handles the passing of messages from the client to the
backend necessary for startup/authentication of a connection. All
communication is between the client and the master node. If the client
authenticates successfully with the master node, then 'true' is returned and
the authenticating connection is terminated.

func Connect

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

func HandleAuthenticationRequest

func HandleAuthenticationRequest(connection net.Conn, message []byte) bool

* Handle authentication requests that are sent by the backend to the client. * * connection - the connection to authenticate against. * message - the authentication message sent by the backend.

func Receive

func Receive(connection net.Conn) ([]byte, int, error)

func Send

func Send(connection net.Conn, message []byte) (int, error)

func UpgradeClientConnection

func UpgradeClientConnection(hostPort string, connection net.Conn) net.Conn

*

func UpgradeServerConnection

func UpgradeServerConnection(client net.Conn) net.Conn

*

func ValidateClient

func ValidateClient(message []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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