tcpclient

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QUERY = byte(0)
)

Variables

This section is empty.

Functions

func GetHeader

func GetHeader(command byte) []byte

func Uint32ToBytes

func Uint32ToBytes(a uint32) []byte

Types

type ClientInterface

type ClientInterface interface {
	Query(s string) (*engine.SearchResults, error)
	PrepareQuery(s string, p uint32) []byte
	Address() string
}

type TCPClient

type TCPClient struct {
	Ip      string
	Port    string
	Network string
}

func NewTCPClient

func NewTCPClient(ip string, port string, network string) *TCPClient

func (*TCPClient) Address

func (c *TCPClient) Address() string

func (*TCPClient) PrepareQuery

func (c *TCPClient) PrepareQuery(s string, p uint32) []byte

func (*TCPClient) Query

func (c *TCPClient) Query(s string, page uint32) (*engine.SearchResults, error)

Jump to

Keyboard shortcuts

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