Documentation
¶
Index ¶
- Constants
- func NewPacketCombiner() protocol.PacketCombiner
- type CallbackRequest
- type CallbackRequestFailed
- type CallbackRequestIncoming
- type FoundFileSources
- type GetFileSources
- type GetList
- type IdChange
- type LoginRequest
- type Message
- type OfferFile
- type OfferFiles
- type SearchMore
- type SearchRequest
- type SearchResult
- type ServerMet
- type ServerMetEntry
- func (e ServerMetEntry) Address() string
- func (e ServerMetEntry) BytesCount() int
- func (e ServerMetEntry) Description() string
- func (e *ServerMetEntry) Get(src *bytes.Reader) error
- func (e ServerMetEntry) Host() string
- func (e ServerMetEntry) Name() string
- func (e ServerMetEntry) Port() int
- func (e ServerMetEntry) Put(dst *bytes.Buffer) error
- type SharedFileEntry
- type Status
Constants ¶
View Source
const ( CapableZlib = 0x0001 CapableIPInLogin = 0x0002 CapableAuxPort = 0x0004 CapableNewTags = 0x0008 CapableUnicode = 0x0010 CapableLargeFile = 0x0100 JED2KVersionMajor = 1 JED2KVersionMinor = 1 JED2KVersionTiny = 0 )
Variables ¶
This section is empty.
Functions ¶
func NewPacketCombiner ¶
func NewPacketCombiner() protocol.PacketCombiner
Types ¶
type CallbackRequest ¶
type CallbackRequest struct {
ClientID int32
}
func (CallbackRequest) BytesCount ¶
func (c CallbackRequest) BytesCount() int
type CallbackRequestFailed ¶
type CallbackRequestFailed struct {
protocol.WithoutDataPacket
}
type CallbackRequestIncoming ¶
func (CallbackRequestIncoming) BytesCount ¶
func (c CallbackRequestIncoming) BytesCount() int
type FoundFileSources ¶
func (FoundFileSources) BytesCount ¶
func (f FoundFileSources) BytesCount() int
type GetFileSources ¶
func (GetFileSources) BytesCount ¶
func (g GetFileSources) BytesCount() int
type IdChange ¶
type IdChange struct {
ClientID int32
TCPFlags int32
AuxPort int32
ReportedIP uint32
ObfuscationTCPPort uint32
}
func (IdChange) BytesCount ¶
type LoginRequest ¶
func NewLoginRequest ¶
func NewLoginRequest(userAgent protocol.Hash, listenPort int, clientName string) LoginRequest
func (LoginRequest) BytesCount ¶
func (l LoginRequest) BytesCount() int
type OfferFiles ¶
type OfferFiles struct {
Entries []SharedFileEntry
}
OfferFiles is the client-to-server shared file publish packet.
func NewOfferFiles ¶
func NewOfferFiles(clientID int32, listenPort int, files []OfferFile) OfferFiles
func (OfferFiles) BytesCount ¶
func (o OfferFiles) BytesCount() int
type SearchMore ¶
type SearchMore struct{}
func (*SearchMore) BytesCount ¶
func (*SearchMore) BytesCount() int
type SearchRequest ¶
type SearchRequest struct {
Query string
MinSize int64
MaxSize int64
MinSources int
MinCompleteSources int
FileType string
Extension string
}
func (*SearchRequest) BytesCount ¶
func (s *SearchRequest) BytesCount() int
type SearchResult ¶
type SearchResult struct {
Results []SharedFileEntry
MoreResults bool
}
func (*SearchResult) BytesCount ¶
func (s *SearchResult) BytesCount() int
type ServerMet ¶
type ServerMet struct {
Header byte
Servers []ServerMetEntry
}
func LoadServerMet ¶
func NewServerMet ¶
func NewServerMet() ServerMet
func ParseServerMet ¶
func (*ServerMet) AddServer ¶
func (m *ServerMet) AddServer(entry ServerMetEntry)
func (ServerMet) BytesCount ¶
type ServerMetEntry ¶
func NewServerMetEntryFromHost ¶
func NewServerMetEntryFromHost(host string, port int, name, description string) (ServerMetEntry, error)
func NewServerMetEntryFromIP ¶
func NewServerMetEntryFromIP(ip string, port int, name, description string) (ServerMetEntry, error)
func (ServerMetEntry) Address ¶
func (e ServerMetEntry) Address() string
func (ServerMetEntry) BytesCount ¶
func (e ServerMetEntry) BytesCount() int
func (ServerMetEntry) Description ¶
func (e ServerMetEntry) Description() string
func (ServerMetEntry) Host ¶
func (e ServerMetEntry) Host() string
func (ServerMetEntry) Name ¶
func (e ServerMetEntry) Name() string
func (ServerMetEntry) Port ¶
func (e ServerMetEntry) Port() int
type SharedFileEntry ¶
type SharedFileEntry struct {
}
func (*SharedFileEntry) BytesCount ¶
func (s *SharedFileEntry) BytesCount() int
Click to show internal directories.
Click to hide internal directories.