Versions in this module Expand all Collapse all v0 v0.1.6 May 2, 2023 v0.1.5 Jun 27, 2022 v0.1.4 May 31, 2022 v0.1.3 Feb 7, 2022 v0.1.2 Feb 4, 2022 v0.1.1 Feb 1, 2022 Changes in this version + const NoID + var ANSWER = byte(1) + var AuthentCode = byte(1) + var BLOCK = byte(0) + var BandwidthCode = byte(19) + var BlockRequestCode = byte(24) + var CancelCode = byte(10) + var ConfExportCode = byte(11) + var ConfImportCode = byte(12) + var ConnectionErrorCode = byte(6) + var DataCode = byte(3) + var EndRequestCode = byte(20) + var EndTransferCode = byte(14) + var ErrorCode = byte(5) + var InformationCode = byte(18) + var JSONRequestCode = byte(25) + var KeepAliveCode = byte(21) + var LogCode = byte(16) + var LogPurgeCode = byte(17) + var NoopCode = byte(23) + var QUESTION = byte(0) + var RequestCode = byte(7) + var RequestUserCode = byte(15) + var ShutdownCode = byte(8) + var StopCode = byte(9) + var TestCode = byte(13) + var UNBLOCK = byte(1) + var ValidCode = byte(4) + type AuthentJSON struct + DigestAlgo string + FileSize bool + FinalHash bool + HostID string + Proxified bool + Separator string + Version string + type AuthentPacket struct + LocalID uint32 + Login string + Password []byte + Version string + Way byte + func (*AuthentPacket) Type() byte + func (p *AuthentPacket) GetJSONVersion() (*AuthentJSON, error) + func (p *AuthentPacket) MarshalBinary() ([]byte, error) + func (p *AuthentPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *AuthentPacket) UnmarshalBinary(src []byte) error + type BlockRequestPacket struct + Block byte + Password []byte + func (*BlockRequestPacket) Type() byte + func (p *BlockRequestPacket) MarshalBinary() ([]byte, error) + func (p *BlockRequestPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *BlockRequestPacket) UnmarshalBinary(src []byte) error + type ConnectionErrorPacket struct + Details string + Message string + func (*ConnectionErrorPacket) Type() byte + func (p *ConnectionErrorPacket) MarshalBinary() ([]byte, error) + func (p *ConnectionErrorPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *ConnectionErrorPacket) UnmarshalBinary(src []byte) error + type DataPacket struct + Data []byte + Hash []byte + Rank uint32 + Unlock func() + func (*DataPacket) Type() byte + func (p *DataPacket) MarshalBinary() ([]byte, error) + func (p *DataPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *DataPacket) UnmarshalBinary(src []byte) error + func (p *DataPacket) WritePacket(writer io.Writer, blockSize uint32) ([]byte, error) + type EndRequestPacket struct + Code uint32 + Optional string + Way byte + func (*EndRequestPacket) Type() byte + func (p *EndRequestPacket) MarshalBinary() ([]byte, error) + func (p *EndRequestPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *EndRequestPacket) UnmarshalBinary(src []byte) error + type EndTransferPacket struct + Hash []byte + Source byte + Way byte + func (*EndTransferPacket) Type() byte + func (p *EndTransferPacket) MarshalBinary() ([]byte, error) + func (p *EndTransferPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *EndTransferPacket) UnmarshalBinary(src []byte) error + type ErrorPacket struct + Action uint32 + Code byte + Message string + func (*ErrorPacket) Type() byte + func (p *ErrorPacket) MarshalBinary() ([]byte, error) + func (p *ErrorPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *ErrorPacket) UnmarshalBinary(src []byte) error + type InformationPacket struct + File string + RequestedInfo byte + Rule string + func (*InformationPacket) Type() byte + func (p *InformationPacket) MarshalBinary() ([]byte, error) + func (p *InformationPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *InformationPacket) UnmarshalBinary(src []byte) error + type JSONRequest struct + Class string + Comment string + FileInfo string + FileSize int + Filename string + RequestPacket byte + type JSONRequestPacket struct + Code byte + Request *JSONRequest + Result string + func (*JSONRequestPacket) Type() byte + func (p *JSONRequestPacket) MarshalBinary() ([]byte, error) + func (p *JSONRequestPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *JSONRequestPacket) UnmarshalBinary(src []byte) error + type KeepAlivePacket struct + Way byte + func (*KeepAlivePacket) Type() byte + func (p *KeepAlivePacket) MarshalBinary() ([]byte, error) + func (p *KeepAlivePacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *KeepAlivePacket) UnmarshalBinary(src []byte) error + type NetworkPacket struct + Content R66Packet + LocalID uint32 + RemoteID uint32 + Size uint32 + Type byte + func (p *NetworkPacket) MarshalBinary() ([]byte, error) + func (p *NetworkPacket) ReadPacket(reader io.Reader) (err error) + func (p *NetworkPacket) UnmarshalBinary(src []byte) error + type NoopPacket struct + func (*NoopPacket) Type() byte + func (p *NoopPacket) MarshalBinary() ([]byte, error) + func (p *NoopPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *NoopPacket) UnmarshalBinary(src []byte) error + type R66Packet interface + Read func(io.Reader, uint32, uint32, uint32) error + Type func() byte + func GetPacket(r io.Reader) (R66Packet, error) + type ReqBody struct + BlockSize uint32 + Code rune + Filename string + Filesize int64 + ID int64 + Limit uint32 + Rank uint32 + type ReqHeader struct + Mode uint32 + Rule string + type RequestPacket struct + Body ReqBody + Header ReqHeader + TransferInfo []byte + Way byte + func (*RequestPacket) Type() byte + func (p *RequestPacket) MarshalBinary() ([]byte, error) + func (p *RequestPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *RequestPacket) UnmarshalBinary(src []byte) error + type ShutdownPacket struct + Password []byte + Restart byte + func (*ShutdownPacket) Type() byte + func (p *ShutdownPacket) MarshalBinary() ([]byte, error) + func (p *ShutdownPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *ShutdownPacket) UnmarshalBinary(src []byte) error + type TestPacket struct + Head string + Message string + Ping uint32 + func (*TestPacket) Type() byte + func (p *TestPacket) MarshalBinary() ([]byte, error) + func (p *TestPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *TestPacket) UnmarshalBinary(src []byte) error + type ValidPacket struct + Code byte + Head string + Message string + func (*ValidPacket) Type() byte + func (p *ValidPacket) MarshalBinary() ([]byte, error) + func (p *ValidPacket) Read(reader io.Reader, hSize uint32, bSize uint32, fSize uint32) error + func (p *ValidPacket) UnmarshalBinary(src []byte) error