client

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFromHost

func ReadFromHost(t *JPRQClient, dstConn *socket.Socket, message *model.ResponseMessage, errChan chan error)

ReadFromHost

Read data from Host Server and forwards them to the JPRQ server
Host Server ----->>> ReadFromHost() ------->>> JPRQ server

func WriteToHost

func WriteToHost(t *JPRQClient, dstConn *socket.Socket, message *model.ResponseMessage, errChan chan error)

WriteToHost

Read data from JPRQ Server and forwards them to the host server
JPRQ Server ----->>> WriteToHost() ------->>> host server

Types

type JPRQClient

type JPRQClient struct {
	DstUrl        string
	DstWSUrl      string
	Host          string
	Token         string
	Conn          *socket.Socket
	SocketTracker map[uuid.UUID]chan *model.ResponseMessage
}

func (*JPRQClient) HTTPRequestListener

func (t *JPRQClient) HTTPRequestListener(message *model.ResponseMessage)

func (*JPRQClient) ReadMessage

func (t *JPRQClient) ReadMessage() (*model.ResponseMessage, error)

func (*JPRQClient) WebsocketRequestListener

func (t *JPRQClient) WebsocketRequestListener(message *model.ResponseMessage)

func (*JPRQClient) WriteMessage

func (t *JPRQClient) WriteMessage(messageType int, data *model.RequestMessage) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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