client

package
v0.0.0-...-578baf5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const VersionBugfix = 1
View Source
const VersionMajor = 0
View Source
const VersionMinor = 1

Variables

Functions

This section is empty.

Types

type InputPacketData

type InputPacketData struct {
	ClientDeviceID string
	ClientType     byte
	ClientVersion  string
	ServerIP       net.IP
	ClientIP       net.IP
}

type New

type New struct {
	ServerIP         net.IP
	ServerPort       uint16
	ClientPrivateKey *rsa.PrivateKey
	ClientPublicKey  *rsa.PublicKey
	ServerPublicKey  *rsa.PublicKey
}

func (*New) CreatePacket

func (n *New) CreatePacket(pd InputPacketData) ([]byte, error)

Returns a byte slice that represents the OpenSPA request packet.

func (*New) Send

func (n *New) Send(pd InputPacketData, timeout uint) (response.Packet, error)

Based on the inputted InputPacketData create a request and send it to the server. After the duration of the timeout parameter (in seconds), we will close the connection and return an error.

Jump to

Keyboard shortcuts

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