connection

package
v0.24.18 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableKeepAlives

func EnableKeepAlives(conn *net.TCPConn) (err error)

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(
	netConn *net.TCPConn,
	methodNameBuffers *map[method.Method][]byte,
	methodValues *map[string]method.Method,

	responseMessageLengthLimit uint,
	clientId string,
) (con *Connection)

func (*Connection) Break

func (con *Connection) Break() (cerr *ce.CommonError)

Break is a method used by a Client to finalize its connection.

func (*Connection) ClientId

func (con *Connection) ClientId() (clientId string)

func (*Connection) GetNextRequest

func (con *Connection) GetNextRequest() (r *request.Request, cerr *ce.CommonError)

GetNextRequest is a method used by a Server to receive a request from the client.

func (*Connection) GetResponseMessage

func (con *Connection) GetResponseMessage() (resp *response.Response, cerr *ce.CommonError)

GetResponseMessage is a method used by a Client to read a response from the server.

func (*Connection) NewMethodFromBytes

func (con *Connection) NewMethodFromBytes(b []byte) (m method.Method, err error)

func (*Connection) NewMethodFromString

func (con *Connection) NewMethodFromString(s string) (m method.Method, err error)

func (*Connection) SendRequestMessage

func (con *Connection) SendRequestMessage(rm *request.Request) (cerr *ce.CommonError)

SendRequestMessage is a method used by a Client to send a request to the server.

func (*Connection) SendResponseMessage

func (con *Connection) SendResponseMessage(rm *response.Response) (cerr *ce.CommonError)

SendResponseMessage is a method used by a Server to send a response to the client.

Jump to

Keyboard shortcuts

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