protocols

package
v1.14.9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

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

func (*HTTP) AddClient

func (st *HTTP) AddClient(client generic.Client, idx int)

func (*HTTP) AvailableConnectionFromPool

func (st *HTTP) AvailableConnectionFromPool() (available bool, idx int)

func (*HTTP) CloseConnection

func (st *HTTP) CloseConnection()

func (*HTTP) ConnectToServer

func (st *HTTP) ConnectToServer(ip, port string)

func (*HTTP) GetClient

func (st *HTTP) GetClient(idx int) (client generic.Client)

func (*HTTP) GetClientFromAddr

func (st *HTTP) GetClientFromAddr(addr string) (client generic.Client)

func (*HTTP) GetClients

func (st *HTTP) GetClients() (client []*generic.Client)

func (*HTTP) ReadString

func (st *HTTP) ReadString() (message string)

func (*HTTP) Receive

func (st *HTTP) Receive() ([]byte, error)

func (*HTTP) ResetClients

func (st *HTTP) ResetClients()

func (*HTTP) Send

func (st *HTTP) Send(msgToServer []byte) error

func (*HTTP) StartServer

func (st *HTTP) StartServer(ip, port string, initialConnections int)

func (*HTTP) StopServer

func (st *HTTP) StopServer()

func (*HTTP) WaitForConnection

func (st *HTTP) WaitForConnection(cliIdx int) (cl *generic.Client)

func (*HTTP) WriteString

func (st *HTTP) WriteString(message string)

type HTTP2

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

func (*HTTP2) AddClient

func (st *HTTP2) AddClient(client generic.Client, idx int)

func (*HTTP2) AvailableConnectionFromPool

func (st *HTTP2) AvailableConnectionFromPool() (available bool, idx int)

func (*HTTP2) CloseConnection

func (st *HTTP2) CloseConnection()

func (*HTTP2) ConnectToServer

func (st *HTTP2) ConnectToServer(ip, port string)

func (*HTTP2) GetClient

func (st *HTTP2) GetClient(idx int) (client generic.Client)

func (*HTTP2) GetClientFromAddr

func (st *HTTP2) GetClientFromAddr(addr string) (client generic.Client)

func (*HTTP2) GetClients

func (st *HTTP2) GetClients() (client []*generic.Client)

func (*HTTP2) ReadString

func (st *HTTP2) ReadString() (message string)

func (*HTTP2) Receive

func (st *HTTP2) Receive() ([]byte, error)

func (*HTTP2) ResetClients

func (st *HTTP2) ResetClients()

func (*HTTP2) Send

func (st *HTTP2) Send(msgToServer []byte) error

func (*HTTP2) StartServer

func (st *HTTP2) StartServer(ip, port string, initialConnections int)

func (*HTTP2) StopServer

func (st *HTTP2) StopServer()

func (*HTTP2) WaitForConnection

func (st *HTTP2) WaitForConnection(cliIdx int) (cl *generic.Client)

func (*HTTP2) WriteString

func (st *HTTP2) WriteString(message string)

type HTTP2Client

type HTTP2Client struct {
	Ip string
	// contains filtered or unexported fields
}

func (*HTTP2Client) AdaptId

func (cl *HTTP2Client) AdaptId() int

func (*HTTP2Client) Address

func (cl *HTTP2Client) Address() string

func (*HTTP2Client) CloseConnection

func (cl *HTTP2Client) CloseConnection()

func (*HTTP2Client) Connection

func (cl *HTTP2Client) Connection() interface{}

func (*HTTP2Client) Read

func (cl *HTTP2Client) Read(b []byte) (err error)

func (*HTTP2Client) ReadString

func (cl *HTTP2Client) ReadString() (message string)

func (*HTTP2Client) Receive

func (cl *HTTP2Client) Receive() (msg []byte, err error)

func (*HTTP2Client) Send

func (cl *HTTP2Client) Send(msg []byte) error

func (*HTTP2Client) SetAdaptId

func (cl *HTTP2Client) SetAdaptId(adaptId int)

func (*HTTP2Client) WriteString

func (cl *HTTP2Client) WriteString(message string)

type HTTP2Request

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

func (HTTP2Request) Request

func (rq HTTP2Request) Request(w http.ResponseWriter, r *http.Request)

func (HTTP2Request) ServeHTTP

func (rq HTTP2Request) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HTTPClient

type HTTPClient struct {
	Ip string
	// contains filtered or unexported fields
}

func (*HTTPClient) AdaptId

func (cl *HTTPClient) AdaptId() int

func (*HTTPClient) Address

func (cl *HTTPClient) Address() string

func (*HTTPClient) CloseConnection

func (cl *HTTPClient) CloseConnection()

func (*HTTPClient) Connection

func (cl *HTTPClient) Connection() interface{}

func (*HTTPClient) Read

func (cl *HTTPClient) Read(b []byte) (err error)

func (*HTTPClient) ReadString

func (cl *HTTPClient) ReadString() (message string)

func (*HTTPClient) Receive

func (cl *HTTPClient) Receive() (msg []byte, err error)

func (*HTTPClient) Send

func (cl *HTTPClient) Send(msg []byte) error

func (*HTTPClient) SetAdaptId

func (cl *HTTPClient) SetAdaptId(adaptId int)

func (*HTTPClient) WriteString

func (cl *HTTPClient) WriteString(message string)

type HTTPRequest

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

func (HTTPRequest) Request

func (rq HTTPRequest) Request(w http.ResponseWriter, r *http.Request)

func (HTTPRequest) ServeHTTP

func (rq HTTPRequest) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HTTPS

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

func (*HTTPS) AddClient

func (st *HTTPS) AddClient(client generic.Client, idx int)

func (*HTTPS) AvailableConnectionFromPool

func (st *HTTPS) AvailableConnectionFromPool() (available bool, idx int)

func (*HTTPS) CloseConnection

func (st *HTTPS) CloseConnection()

func (*HTTPS) ConnectToServer

func (st *HTTPS) ConnectToServer(ip, port string)

func (*HTTPS) GetClient

func (st *HTTPS) GetClient(idx int) (client generic.Client)

func (*HTTPS) GetClientFromAddr

func (st *HTTPS) GetClientFromAddr(addr string) (client generic.Client)

func (*HTTPS) GetClients

func (st *HTTPS) GetClients() (client []*generic.Client)

func (*HTTPS) ReadString

func (st *HTTPS) ReadString() (message string)

func (*HTTPS) Receive

func (st *HTTPS) Receive() ([]byte, error)

func (*HTTPS) ResetClients

func (st *HTTPS) ResetClients()

func (*HTTPS) Send

func (st *HTTPS) Send(msgToServer []byte) error

func (*HTTPS) StartServer

func (st *HTTPS) StartServer(ip, port string, initialConnections int)

func (*HTTPS) StopServer

func (st *HTTPS) StopServer()

func (*HTTPS) WaitForConnection

func (st *HTTPS) WaitForConnection(cliIdx int) (cl *generic.Client)

func (*HTTPS) WriteString

func (st *HTTPS) WriteString(message string)

type HTTPSClient

type HTTPSClient struct {
	Ip string
	// contains filtered or unexported fields
}

func (*HTTPSClient) AdaptId

func (cl *HTTPSClient) AdaptId() int

func (*HTTPSClient) Address

func (cl *HTTPSClient) Address() string

func (*HTTPSClient) CloseConnection

func (cl *HTTPSClient) CloseConnection()

func (*HTTPSClient) Connection

func (cl *HTTPSClient) Connection() interface{}

func (*HTTPSClient) Read

func (cl *HTTPSClient) Read(b []byte) (err error)

func (*HTTPSClient) ReadString

func (cl *HTTPSClient) ReadString() (message string)

func (*HTTPSClient) Receive

func (cl *HTTPSClient) Receive() (msg []byte, err error)

func (*HTTPSClient) Send

func (cl *HTTPSClient) Send(msg []byte) error

func (*HTTPSClient) SetAdaptId

func (cl *HTTPSClient) SetAdaptId(adaptId int)

func (*HTTPSClient) WriteString

func (cl *HTTPSClient) WriteString(message string)

type HTTPSRequest

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

func (HTTPSRequest) Request

func (rq HTTPSRequest) Request(w http.ResponseWriter, r *http.Request)

func (HTTPSRequest) ServeHTTP

func (rq HTTPSRequest) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RPC

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

func (*RPC) AddClient

func (st *RPC) AddClient(client generic.Client, idx int)

func (*RPC) AvailableConnectionFromPool

func (st *RPC) AvailableConnectionFromPool() (available bool, idx int)

func (*RPC) Call

func (st *RPC) Call(serviceMethod string, args any, reply any) (err error)

func (*RPC) CloseConnection

func (st *RPC) CloseConnection()

func (*RPC) ConnectToServer

func (st *RPC) ConnectToServer(ip, port string)

func (*RPC) GetClient

func (st *RPC) GetClient(idx int) (client generic.Client)

func (*RPC) GetClientFromAddr

func (st *RPC) GetClientFromAddr(addr string) (client generic.Client)

func (*RPC) GetClients

func (st *RPC) GetClients() (client []*generic.Client)

func (*RPC) ReadString

func (st *RPC) ReadString() (message string)

func (*RPC) Receive

func (st *RPC) Receive() ([]byte, error)

func (*RPC) ResetClients

func (st *RPC) ResetClients()

func (*RPC) Send

func (st *RPC) Send(msgToServer []byte) error

func (*RPC) StartServer

func (st *RPC) StartServer(ip, port string, initialConnections int)

func (*RPC) StopServer

func (st *RPC) StopServer()

func (*RPC) WaitForConnection

func (st *RPC) WaitForConnection(cliIdx int) (cl *generic.Client)

func (*RPC) WriteString

func (st *RPC) WriteString(message string)

type RPCClient

type RPCClient struct {
	Ip string
	// contains filtered or unexported fields
}

func (*RPCClient) AdaptId

func (cl *RPCClient) AdaptId() int

func (*RPCClient) Address

func (cl *RPCClient) Address() string

func (*RPCClient) CloseConnection

func (cl *RPCClient) CloseConnection()

func (*RPCClient) Connection

func (cl *RPCClient) Connection() interface{}

func (*RPCClient) Read

func (cl *RPCClient) Read(b []byte) (err error)

func (*RPCClient) ReadString

func (cl *RPCClient) ReadString() (message string)

func (*RPCClient) Receive

func (cl *RPCClient) Receive() (msg []byte, err error)

func (*RPCClient) Send

func (cl *RPCClient) Send(msg []byte) error

func (*RPCClient) SetAdaptId

func (cl *RPCClient) SetAdaptId(adaptId int)

func (*RPCClient) WriteString

func (cl *RPCClient) WriteString(message string)

type RPCRequest

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

func (RPCRequest) Request

func (rq RPCRequest) Request(request []byte, reply *[]byte) error

type TCP

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

func (*TCP) AddClient

func (st *TCP) AddClient(client generic.Client, idx int)

func (*TCP) AvailableConnectionFromPool

func (st *TCP) AvailableConnectionFromPool() (available bool, idx int)

func (*TCP) CloseConnection

func (st *TCP) CloseConnection()

func (*TCP) ConnectToServer

func (st *TCP) ConnectToServer(ip, port string)

func (*TCP) GetClient

func (st *TCP) GetClient(idx int) (client generic.Client)

func (*TCP) GetClientFromAddr

func (st *TCP) GetClientFromAddr(addr string) (client generic.Client)

func (*TCP) GetClients

func (st *TCP) GetClients() (client []*generic.Client)

func (*TCP) ReadString

func (st *TCP) ReadString() (message string)

func (*TCP) Receive

func (st *TCP) Receive() ([]byte, error)

func (*TCP) ResetClients

func (st *TCP) ResetClients()

func (*TCP) Send

func (st *TCP) Send(msgToServer []byte) error

func (*TCP) StartServer

func (st *TCP) StartServer(ip, port string, initialConnections int)

func (*TCP) StopServer

func (st *TCP) StopServer()

func (*TCP) WaitForConnection

func (st *TCP) WaitForConnection(cliIdx int) (cl *generic.Client)

func (*TCP) WriteString

func (st *TCP) WriteString(message string)

type TCPClient

type TCPClient struct {
	Ip string
	// contains filtered or unexported fields
}

func (*TCPClient) AdaptId

func (cl *TCPClient) AdaptId() int

func (*TCPClient) Address

func (cl *TCPClient) Address() string

func (*TCPClient) CloseConnection

func (cl *TCPClient) CloseConnection()

func (*TCPClient) Connection

func (cl *TCPClient) Connection() interface{}

func (*TCPClient) Read

func (cl *TCPClient) Read(b []byte) (err error)

func (*TCPClient) ReadString

func (cl *TCPClient) ReadString() (message string)

func (*TCPClient) Receive

func (cl *TCPClient) Receive() (msg []byte, err error)

func (*TCPClient) Send

func (cl *TCPClient) Send(msg []byte) error

func (*TCPClient) SetAdaptId

func (cl *TCPClient) SetAdaptId(adaptId int)

func (*TCPClient) WriteString

func (cl *TCPClient) WriteString(message string)

Jump to

Keyboard shortcuts

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