proto

package
v0.0.0-...-5a3fdb9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BLOCKS_PER_PIECE int = PIECE_SIZE / BLOCK_SIZE // 50
View Source
const BLOCK_SIZE int = 190 * 1024 // 190kb = PIECE_SIZE/50
View Source
const BLOCK_SIZE_UINT64 uint64 = 190 * 1024 // 190kb = PIECE_SIZE/50
View Source
const CAPABLE_AUXPORT = SRVCAP_AUXPORT
View Source
const CAPABLE_IP_IN_LOGIN_FRAME = SRVCAP_IP_IN_LOGIN
View Source
const CAPABLE_LARGEFILES = SRVCAP_LARGEFILES
View Source
const CAPABLE_NEWTAGS = SRVCAP_NEWTAGS
View Source
const CAPABLE_UNICODE = SRVCAP_UNICODE
View Source
const CAPABLE_ZLIB = SRVCAP_ZLIB
View Source
const CAPTHA_OFFSET int = 11
View Source
const CT_EMULECOMPAT_OPTIONS byte = 0xEF
View Source
const CT_EMULE_BUDDYIP byte = 0xFC
View Source
const CT_EMULE_BUDDYUDP byte = 0xFD
View Source
const CT_EMULE_MISCOPTIONS1 byte = 0xFA
View Source
const CT_EMULE_MISCOPTIONS2 byte = 0xFE
View Source
const CT_EMULE_RESERVED1 byte = 0xF0
View Source
const CT_EMULE_RESERVED13 byte = 0xFF
View Source
const CT_EMULE_RESERVED2 byte = 0xF1
View Source
const CT_EMULE_RESERVED3 byte = 0xF2
View Source
const CT_EMULE_RESERVED4 byte = 0xF3
View Source
const CT_EMULE_RESERVED5 byte = 0xF4
View Source
const CT_EMULE_RESERVED6 byte = 0xF5
View Source
const CT_EMULE_RESERVED7 byte = 0xF6
View Source
const CT_EMULE_RESERVED8 byte = 0xF7
View Source
const CT_EMULE_RESERVED9 byte = 0xF8
View Source
const CT_EMULE_UDPPORTS byte = 0xF9
View Source
const CT_EMULE_VERSION byte = 0xFB
View Source
const CT_MOD_VERSION byte = 0x55
View Source
const CT_NAME byte = 0x01
View Source
const CT_PORT byte = 0x0F
View Source
const CT_SERVER_FLAGS byte = 0x20 // currently only used to inform a server about supported features
View Source
const CT_SERVER_UDPSEARCH_FLAGS byte = 0x0E
View Source
const CT_VERSION byte = 0x11
View Source
const ED2KFTSTR_ARCHIVE string = "Arc" // *Mule internal use only
View Source
const ED2KFTSTR_AUDIO string = "Audio"

Media values for FT_FILETYPE

View Source
const ED2KFTSTR_CDIMAGE string = "Iso" // *Mule internal use only
View Source
const ED2KFTSTR_DOCUMENT string = "Doc"
View Source
const ED2KFTSTR_EMULECOLLECTION string = "EmuleCollection"
View Source
const ED2KFTSTR_FOLDER string = "Folder" // Value for eD2K tag FT_FILETYPE
View Source
const ED2KFTSTR_IMAGE string = "Image"
View Source
const ED2KFTSTR_PROGRAM string = "Pro"
View Source
const ED2KFTSTR_USER string = "User" // eMule internal use only
View Source
const ED2KFTSTR_VIDEO string = "Video"
View Source
const ED2KFT_ANY byte = 0
View Source
const ED2KFT_ARCHIVE byte = 6 // ED2K protocol value (eserver 17.6+)
View Source
const ED2KFT_AUDIO byte = 1 // ED2K protocol value (eserver 17.6+)
View Source
const ED2KFT_CDIMAGE byte = 7 // ED2K protocol value (eserver 17.6+)
View Source
const ED2KFT_DOCUMENT byte = 5 // ED2K protocol value (eserver 17.6+)
View Source
const ED2KFT_EMULECOLLECTION byte = 8
View Source
const ED2KFT_IMAGE byte = 3 // ED2K protocol value (eserver 17.6+)
View Source
const ED2KFT_PROGRAM byte = 4 // ED2K protocol value (eserver 17.6+)
View Source
const ED2KFT_VIDEO byte = 2 // ED2K protocol value (eserver 17.6+)
View Source
const ED2K_MAX_PACKET_SIZE int = 125000
View Source
const ED2K_SEARCH_OP_EQUAL byte = 0
View Source
const ED2K_SEARCH_OP_GREATER byte = 1
View Source
const ED2K_SEARCH_OP_GREATER_EQUAL byte = 3
View Source
const ED2K_SEARCH_OP_LESS byte = 2
View Source
const ED2K_SEARCH_OP_LESS_EQUAL byte = 4
View Source
const ED2K_SEARCH_OP_NOTEQUAL byte = 5
View Source
const ET_COMMENTS byte = 0x24
View Source
const ET_COMPATIBLECLIENT byte = 0x26
View Source
const ET_COMPRESSION byte = 0x20
View Source
const ET_EXTENDEDREQUEST byte = 0x25
View Source
const ET_FEATURES byte = 0x27
View Source
const ET_MOD_VERSION byte = CT_MOD_VERSION
View Source
const ET_SOURCEEXCHANGE byte = 0x23
View Source
const ET_UDPPORT byte = 0x21
View Source
const ET_UDPVER byte = 0x22
View Source
const FT_AICH_HASH byte = 0x27
View Source
const FT_ATACCEPTED byte = 0x52 // <uint32>
View Source
const FT_ATREQUESTED byte = 0x51 // <uint32>
View Source
const FT_ATTRANSFERRED byte = 0x50 // <uint32>
View Source
const FT_ATTRANSFERREDHI byte = 0x54 // <uint32>
View Source
const FT_CATEGORY byte = 0x53 // <uint32>
View Source
const FT_COMPLETE_SOURCES byte = 0x30 // nr. of sources which share a
View Source
const FT_CORRUPTEDPARTS byte = 0x24 // <string>
View Source
const FT_DLPRIORITY byte = 0x18 // Was 13
View Source
const FT_DL_ACTIVE_TIME byte = 0x23 // <uint32>
View Source
const FT_DL_PREVIEW byte = 0x25
View Source
const FT_ED2K_MEDIA_ALBUM string = "Album" // <string>
View Source
const FT_ED2K_MEDIA_ARTIST string = "Artist" // <string>

Additional media meta data tags from eDonkeyHybrid (note also the uppercase/lowercase)

View Source
const FT_ED2K_MEDIA_BITRATE string = "bitrate" // <uint32>
View Source
const FT_ED2K_MEDIA_CODEC string = "codec" // <string>
View Source
const FT_ED2K_MEDIA_LENGTH string = "length" // <string> !!!
View Source
const FT_ED2K_MEDIA_TITLE string = "Title" // <string>
View Source
const FT_FAST_RESUME_DATA byte = 0x31 // fast resume data array
View Source
const FT_FILEFORMAT byte = 0x04 // <string>
View Source
const FT_FILEHASH byte = 0x28
View Source
const FT_FILENAME byte = 0x01 // <string>
View Source
const FT_FILERATING byte = 0xF7 // <uint8>
View Source
const FT_FILESIZE byte = 0x02 // <uint32>
View Source
const FT_FILESIZE_HI byte = 0x3A // <uint32>
View Source
const FT_FILETYPE byte = 0x03 // <string> or <uint32>
View Source
const FT_FLAGS byte = 0x22 // <uint32>
View Source
const FT_GAPEND byte = 0x0A // <uint32>
View Source
const FT_GAPSTART byte = 0x09 // <uint32>
View Source
const FT_KADLASTPUBLISHKEY byte = 0x20 // <uint32>
View Source
const FT_KADLASTPUBLISHNOTES byte = 0x26 // <uint32>
View Source
const FT_KADLASTPUBLISHSRC byte = 0x21 // <uint32>
View Source
const FT_LASTSEENCOMPLETE byte = 0x05 // <uint32>
View Source
const FT_MEDIA_ALBUM byte = 0xD1 // <string>
View Source
const FT_MEDIA_ARTIST byte = 0xD0 // <string>
View Source
const FT_MEDIA_BITRATE byte = 0xD4 // <uint32>
View Source
const FT_MEDIA_CODEC byte = 0xD5 // <string>
View Source
const FT_MEDIA_LENGTH byte = 0xD3 // <uint32> !!!
View Source
const FT_MEDIA_TITLE byte = 0xD2 // <string>
View Source
const FT_OLDDLPRIORITY byte = 0x13 // Not used anymore
View Source
const FT_OLDULPRIORITY byte = 0x17 // Not used anymore
View Source
const FT_PARTFILENAME byte = 0x12 // <string>
View Source
const FT_PERMISSIONS byte = 0x16 // <uint32>
View Source
const FT_PUBLISHINFO byte = 0x33 // <uint32>
View Source
const FT_SOURCES byte = 0x15 // <uint32>
View Source
const FT_STATUS byte = 0x14 // <uint32>
View Source
const FT_TRANSFERRED byte = 0x08 // <uint32>
View Source
const FT_ULPRIORITY byte = 0x19 // Was 17
View Source
const FT_UNDEFINED byte = 0x00 // undefined tag
View Source
const GED2K_VERSION_MAJOR = 1
View Source
const GED2K_VERSION_MINOR = 1
View Source
const GED2K_VERSION_TINY = 0
View Source
const HASH_LEN int = 16
View Source
const HEADER_SIZE int = 6
View Source
const HIGHEST_LOWID_ED2K uint32 = 16777216
View Source
const LARGE_FILE_OFFSET int = 4
View Source
const MAX_ELEMS int = 1000
View Source
const MULTIP_OFFSET int = 5
View Source
const MaxUint32 = ^uint32(0)
View Source
const OPER_AND byte = 0x00
View Source
const OPER_NOT byte = 0x02
View Source
const OPER_OR byte = 0x01
View Source
const OP_ACCEPTUPLOADREQ byte = 0x55 // (null)
View Source
const OP_AICHANSWER byte = 0x9C // <HASH 16><uint16><HASH aichhashlen> <data>
View Source
const OP_AICHFILEHASHANS byte = 0x9D
View Source
const OP_AICHFILEHASHREQ byte = 0x9E
View Source
const OP_AICHREQUEST byte = 0x9B // <HASH 16><uint16><HASH aichhashlen>
View Source
const OP_ANSWERSOURCES byte = 0x82 //
View Source
const OP_ANSWERSOURCES2 byte = 0x84 //
View Source
const OP_ASKSHAREDDENIEDANS byte = 0x61 // (null)
View Source
const OP_ASKSHAREDDIRS byte = 0x5D // (null)
View Source
const OP_ASKSHAREDDIRSANS byte = 0x5F // <count 4>(<len 2><Directory len>)[count]
View Source
const OP_ASKSHAREDFILES byte = 0x4A // (null)
View Source
const OP_ASKSHAREDFILESANSWER byte = 0x4B // <count 4>(<HASH 16><ID 4><PORT 2><1 Tag_set>)[count]
View Source
const OP_ASKSHAREDFILESDIR byte = 0x5E // <len 2><Directory len>
View Source
const OP_ASKSHAREDFILESDIRANS byte = 0x60 // <len 2><Directory len><count 4>(<HASH 16><ID 4><PORT 2><1 T
View Source
const OP_BUDDYPING byte = 0x9F
View Source
const OP_BUDDYPONG byte = 0xA0
View Source
const OP_CALLBACK byte = 0x99 // <HASH 16><HASH 16><uint 16>
View Source
const OP_CALLBACKREQUEST byte = 0x1C // <ID 4>
View Source
const OP_CALLBACKREQUESTED byte = 0x35 // <IP 4><PORT 2>
View Source
const OP_CALLBACK_FAIL byte = 0x36 // (null notverified)
View Source
const OP_CANCELTRANSFER byte = 0x56 // (null)
View Source
const OP_CHANGE_CLIENT_ID byte = 0x4D // <ID_old 4><ID_new 4> // Unused for sending
View Source
const OP_CHANGE_SLOT byte = 0x5B // <HASH 16> // Not used for sending
View Source
const OP_CHATCAPTCHAREQ byte = 0xA5
View Source
const OP_CHATCAPTCHARES byte = 0xA6
View Source
const OP_COMPRESSEDPART byte = 0x40 //
View Source
const OP_COMPRESSEDPART_I64 byte = 0xA1 // <HASH 16><von 8><size 4><Data len:size>
View Source
const OP_DISCONNECT byte = 0x18 // (not verified)
View Source
const OP_EDONKEYHEADER byte = 0xE3
View Source
const OP_EDONKEYPROT byte = 0xE3
View Source
const OP_EMULEINFO byte = 0x01 //
View Source
const OP_EMULEINFOANSWER byte = 0x02 //
View Source
const OP_EMULEPROT byte = 0xC5
View Source
const OP_END_OF_DOWNLOAD byte = 0x49 // <HASH 16> // Unused for sending
View Source
const OP_FILEDESC byte = 0x61 // <len 2><NAME len>
View Source
const OP_FILEREQANSNOFIL byte = 0x48 // <HASH 16>
View Source
const OP_FILESTATUS byte = 0x50 // <HASH 16><count 2><status(bit array) len:((count+7)/8)>
View Source
const OP_FOUNDSOURCES byte = 0x42 // <HASH 16><count 1>(<ID 4><PORT 2>)[count]
View Source
const OP_FOUNDSOURCES_OBFU byte = 0x44 // <HASH 16><count 1>(<ID 4><PORT 2><obf

Tag_set>)[count]

View Source
const OP_GETSERVERLIST byte = 0x14 // (null)client->server
View Source
const OP_GETSOURCES byte = 0x19 // <HASH 16>
View Source
const OP_GETSOURCES_OBFU byte = 0x23
View Source
const OP_HASHSETANSWER byte = 0x52 // <count 2><HASH[count] 16*count>
View Source
const OP_HASHSETREQUEST byte = 0x51 // <HASH 16>
View Source
const OP_HELLO byte = 0x01 // 0x10<HASH 16><ID 4><PORT 2><1 Tag_set>
View Source
const OP_HELLOANSWER byte = 0x4C // <HASH 16><ID 4><PORT 2><1 Tag_set><SERVER_IP 4><SERVER_PORT 2>
View Source
const OP_IDCHANGE byte = 0x40 // <NEW_ID 4>

const OP_CHAT_ROOM_REQUEST = 0x39, // (deprecated, not supported by server any longer) const OP_CHAT_BROADCAST = 0x3A, // (deprecated, not supported by server any longer) const OP_CHAT_USER_JOIN = 0x3B, // (deprecated, not supported by server any longer) const OP_CHAT_USER_LEAVE = 0x3C, // (deprecated, not supported by server any longer) const OP_CHAT_USER = 0x3D, // (deprecated, not supported by server any longer)

View Source
const OP_KADEMLIAHEADER byte = 0xE4
View Source
const OP_KAD_COMPRESSED_UDP byte = 0xE5
View Source
const OP_LOGINREQUEST byte = 0x01 // <HASH 16><ID 4><PORT 2><1 Tag_set>

server

View Source
const OP_MESSAGE byte = 0x4E // <len 2><Message len>
View Source
const OP_MULTIPACKET byte = 0x92
View Source
const OP_MULTIPACKETANSWER byte = 0x93
View Source
const OP_MULTIPACKET_EXT byte = 0xA4
View Source
const OP_OFFERFILES byte = 0x15 // <count 4>(<HASH 16><ID 4><PORT 2><1
View Source
const OP_OUTOFPARTREQS byte = 0x57 // (null)
View Source
const OP_PACKEDPROT byte = 0xD4
View Source
const OP_PREVIEWANSWER byte = 0x91 // <HASH 16><frames 1>{frames * <len 4><frame len>} // Never used for sending on aMule
View Source
const OP_PUBLICIP_ANSWER byte = 0x98
View Source
const OP_PUBLICIP_REQ byte = 0x97

OP_PEERCACHE_QUERY byte = 0x94 // Unused on aMule - no PeerCache OP_PEERCACHE_ANSWER byte = 0x95 // Unused on aMule - no PeerCache OP_PEERCACHE_ACK byte = 0x96 // Unused on aMule - no PeerCache

View Source
const OP_PUBLICKEY byte = 0x85 // <len 1><pubkey len>
View Source
const OP_QUERY_MORE_RESULT byte = 0x21 // ?

const OP_QUERY_CHATS = 0x1D, // (deprecated, not supported by server any longer) const OP_CHAT_MESSAGE = 0x1E, // (deprecated, not supported by server any longer) const OP_JOIN_ROOM = 0x1F, // (deprecated, not supported by server any longer)

View Source
const OP_QUEUERANK byte = 0x5C // <wert  4> (slot index of the request) // Not used for sending
View Source
const OP_QUEUERANKING byte = 0x60 // <RANG 2>
View Source
const OP_REASKCALLBACKTCP byte = 0x9A
View Source
const OP_REJECT byte = 0x05 // (null)
View Source
const OP_REQFILENAMEANSWER byte = 0x59 // <HASH 16><len 4><NAME len>
View Source
const OP_REQUESTFILENAME byte = 0x58 // <HASH 16>    (more correctly file_name_request)
View Source
const OP_REQUESTPARTS byte = 0x47 // <HASH 16><von[3] 4*3><bis[3] 4*3>
View Source
const OP_REQUESTPARTS_I64 byte = 0xA3 // <HASH 16><start[3] 8*3><end[3] 8*3>
View Source
const OP_REQUESTPREVIEW byte = 0x90 // <HASH 16> // Never used for sending on aMule
View Source
const OP_REQUESTSOURCES byte = 0x81 // <HASH 16>
View Source
const OP_REQUESTSOURCES2 byte = 0x83 // <HASH 16>
View Source
const OP_SEARCHREQUEST byte = 0x16 // <Query_Tree>

Tag_set>)[count]

View Source
const OP_SEARCHRESULT byte = 0x33 // <count 4>(<HASH 16><ID 4><PORT 2><1

2>)[count] server->client

View Source
const OP_SEARCH_USER byte = 0x1A // <Query_Tree>

v2 <HASH 16><SIZE_4> (17.3) (mandatory on 17.8) v2large <HASH 16><FILESIZE 4 byte 0)><FILESIZE 8> (17.9) (large files only)

View Source
const OP_SECIDENTSTATE byte = 0x87 // <state 1><rndchallenge 4>

v2:<len 1><signature len><sigIPused 1>

View Source
const OP_SENDINGPART byte = 0x46 // <HASH 16><von 4><bis 4><Daten len:(von-bis)>
View Source
const OP_SENDINGPART_I64 byte = 0xA2 // <HASH 16><start 8><end 8><Data len:(end-start)>
View Source
const OP_SERVERIDENT byte = 0x41 // <HASH 16><IP 4><PORT 2>{1 TAG_SET}
View Source
const OP_SERVERLIST byte = 0x32 // <count 1>(<IP 4><PORT
View Source
const OP_SERVERMESSAGE byte = 0x38 // <len 2><Message len>
View Source
const OP_SERVERSTATUS byte = 0x34 // <USER 4><FILES 4>

Tag_set>)[count]

View Source
const OP_SETREQFILEID byte = 0x4F // <HASH 16>
View Source
const OP_SIGNATURE byte = 0x86 // v1: <len 1><signature len>
View Source
const OP_STARTUPLOADREQ byte = 0x54 // <HASH 16>
View Source
const OP_UDPVERIFYUPA byte = 0x74 // (never used)
View Source
const OP_UDPVERIFYUPREQ byte = 0x73 // (never used)
View Source
const OP_USERS_LIST byte = 0x43 // <count 4>(<HASH 16><ID 4><PORT 2><1
View Source
const OP_VERIFYUPSANSWER byte = 0x72 // (never used)
View Source
const OP_VERIFYUPSREQ byte = 0x71 // (never used)
View Source
const PARTS_IN_REQUEST int = 3
View Source
const PIECE_SIZE int = 9728000
View Source
const PIECE_SIZE_UINT64 uint64 = 9728000
View Source
const REQUEST_QUEUE_SIZE int = 3
View Source
const SEARCH_REQ_ELEM_COUNT int = 30
View Source
const SEARCH_REQ_ELEM_LENGTH int = 20
View Source
const SEARCH_REQ_QUERY_LENGTH int = 450
View Source
const SEARCH_TYPE_BOOL byte = 0x00
View Source
const SEARCH_TYPE_STR byte = 0x01
View Source
const SEARCH_TYPE_STR_TAG byte = 0x02
View Source
const SEARCH_TYPE_UINT32 byte = 0x03
View Source
const SEARCH_TYPE_UINT64 byte = 0x08
View Source
const SO_AMULE int = 3
View Source
const SO_CDONKEY int = 1
View Source
const SO_COMPAT_UNK int = 0xFF
View Source
const SO_EDONKEY int = 0x33
View Source
const SO_EDONKEYHYBRID int = 0x32
View Source
const SO_EMULE int = 0
View Source
const SO_EMULEPLUS int = 5
View Source
const SO_HYDRANODE int = 6
View Source
const SO_LIBED2K int = 0x99
View Source
const SO_LPHANT int = 0x14
View Source
const SO_LXMULE int = 2
View Source
const SO_MLDONKEY int = 0x34
View Source
const SO_NEW2_MLDONKEY int = 0x0a
View Source
const SO_NEW2_SHAREAZA int = 0x28
View Source
const SO_NEW_MLDONKEY int = 0x98
View Source
const SO_NEW_SHAREAZA int = 0x44
View Source
const SO_OLDEMULE int = 0x35
View Source
const SO_QMULE int = 0xA0
View Source
const SO_SHAREAZA int = 4
View Source
const SO_UNKNOWN int = 0x36
View Source
const SRC_EXT_OFFSET int = 10
View Source
const SRVCAP_AUXPORT = 0x0004
View Source
const SRVCAP_IP_IN_LOGIN = 0x0002
View Source
const SRVCAP_LARGEFILES = 0x0100
View Source
const SRVCAP_NEWTAGS = 0x0008
View Source
const SRVCAP_REQUESTCRYPT = 0x0400
View Source
const SRVCAP_REQUIRECRYPT = 0x0800
View Source
const SRVCAP_SUPPORTCRYPT = 0x0200
View Source
const SRVCAP_UNICODE = 0x0010
View Source
const SRVCAP_ZLIB = 0x0001
View Source
const SRV_TCPFLG_COMPRESSION = 0x00000001
View Source
const SRV_TCPFLG_LARGEFILES = 0x00000100
View Source
const SRV_TCPFLG_NEWTAGS = 0x00000008
View Source
const SRV_TCPFLG_RELATEDSEARCH = 0x00000040
View Source
const SRV_TCPFLG_TCPOBFUSCATION = 0x00000400
View Source
const SRV_TCPFLG_TYPETAGINTEGER = 0x00000080
View Source
const SRV_TCPFLG_UNICODE = 0x00000010
View Source
const ST_AUXPORTSLIST byte = 0x93 // <string>
View Source
const ST_DESCRIPTION byte = 0x0B // <string>

Unused (0x02-0x0A)

View Source
const ST_DYNIP byte = 0x85

Unused (0x0F-0x84)

View Source
const ST_FAIL byte = 0x0D // <uint32>
View Source
const ST_HARDFILES byte = 0x89
View Source
const ST_LASTPING byte = 0x90 // <uint32>

Unused (0x8A-0x8F)

View Source
const ST_LASTPING_DEPRECATED byte = 0x86 // <uint32> // DEPRECATED, use 0x90
View Source
const ST_LOWIDUSERS byte = 0x94 // <uint32>
View Source
const ST_MAXUSERS byte = 0x87
View Source
const ST_PING byte = 0x0C // <uint32>
View Source
const ST_PREFERENCE byte = 0x0E // <uint32>
View Source
const ST_SERVERNAME byte = 0x01 // <string>
View Source
const ST_SOFTFILES byte = 0x88
View Source
const ST_TCPPORTOBFUSCATION byte = 0x97 // <uint16>
View Source
const ST_UDPFLAGS byte = 0x92 // <uint32>
View Source
const ST_UDPKEY byte = 0x95 // <uint32>
View Source
const ST_UDPKEYIP byte = 0x96 // <uint32>
View Source
const ST_UDPPORTOBFUSCATION byte = 0x98 // <uint16>
View Source
const ST_VERSION byte = 0x91 // <string>
View Source
const TAGTYPE_BLOB byte = 0x07
View Source
const TAGTYPE_BOOL byte = 0x05
View Source
const TAGTYPE_BOOLARRAY byte = 0x06
View Source
const TAGTYPE_BSOB byte = 0x0A
View Source
const TAGTYPE_FLOAT32 byte = 0x04
View Source
const TAGTYPE_HASH16 byte = 0x01
View Source
const TAGTYPE_STR1 byte = 0x11

Compressed string types

View Source
const TAGTYPE_STR10 byte = 0x1A
View Source
const TAGTYPE_STR11 byte = 0x1B
View Source
const TAGTYPE_STR12 byte = 0x1C
View Source
const TAGTYPE_STR13 byte = 0x1D
View Source
const TAGTYPE_STR14 byte = 0x1E
View Source
const TAGTYPE_STR15 byte = 0x1F
View Source
const TAGTYPE_STR16 byte = 0x20
View Source
const TAGTYPE_STR17 byte = 0x21 // accepted by eMule 0.42f (02-Mai-2004) in receiving code
View Source
const TAGTYPE_STR18 byte = 0x22 // accepted by eMule 0.42f (02-Mai-2004) in receiving code

only because of a flaw, those tags are handled correctly, but should not be handled at all

View Source
const TAGTYPE_STR19 byte = 0x23 // accepted by eMule 0.42f (02-Mai-2004) in receiving code
only because of a flaw, those tags are handled correctly,

but should not be handled at all

View Source
const TAGTYPE_STR2 byte = 0x12
View Source
const TAGTYPE_STR20 byte = 0x24 // accepted by eMule 0.42f (02-Mai-2004) in receiving code

only because of a flaw, those tags are handled correctly, but should not be handled at all

View Source
const TAGTYPE_STR21 byte = 0x25 // accepted by eMule 0.42f (02-Mai-2004) in receiving code

only because of a flaw, those tags are handled correctly, but should not be handled at all

View Source
const TAGTYPE_STR22 byte = 0x26

only because of a flaw, those tags are handled correctly, but should not be handled at all

View Source
const TAGTYPE_STR3 byte = 0x13
View Source
const TAGTYPE_STR4 byte = 0x14
View Source
const TAGTYPE_STR5 byte = 0x15
View Source
const TAGTYPE_STR6 byte = 0x16
View Source
const TAGTYPE_STR7 byte = 0x17
View Source
const TAGTYPE_STR8 byte = 0x18
View Source
const TAGTYPE_STR9 byte = 0x19
View Source
const TAGTYPE_STRING byte = 0x02
View Source
const TAGTYPE_UINT16 byte = 0x08
View Source
const TAGTYPE_UINT32 byte = 0x03
View Source
const TAGTYPE_UINT64 byte = 0x0B
View Source
const TAGTYPE_UINT8 byte = 0x09
View Source
const TAGTYPE_UNDEFINED byte = 0x00 // special tag definition for empty objects
View Source
const TAG_AVAILABILITY byte = 0x15 // <uint32>
View Source
const TAG_BUDDYHASH byte = 0xF8 // <string>
View Source
const TAG_CLIENTLOWID byte = 0xF9 // <uint32>
View Source
const TAG_COLLECTION byte = 0x05
View Source
const TAG_COPIED byte = 0x08 // <uint32>
View Source
const TAG_DESCRIPTION byte = 0x0B // <string>
View Source
const TAG_ENCRYPTION byte = 0xF3 // <uint8>
View Source
const TAG_FAIL byte = 0x0D
View Source
const TAG_FILEFORMAT byte = 0x04 // <string>
View Source
const TAG_FILENAME byte = 0x01 // <string>

Kad search + some unused tags to mirror the ed2k ones.

View Source
const TAG_FILERATING byte = 0xF7 // <uint8>
View Source
const TAG_FILESIZE byte = 0x02 // <uint32>
View Source
const TAG_FILESIZE_HI byte = 0x3A // <uint32>
View Source
const TAG_FILETYPE byte = 0x03 // <string>
View Source
const TAG_GAP_END byte = 0x0A // <uint32>
View Source
const TAG_GAP_START byte = 0x09 // <uint32>
View Source
const TAG_IP_ADDRESS byte = 0x10
View Source
const TAG_KADMISCOPTIONS byte = 0xF2 // <uint8>
View Source
const TAG_MEDIA_ALBUM byte = 0xD1 // <string>
View Source
const TAG_MEDIA_ARTIST byte = 0xD0 // <string>
View Source
const TAG_MEDIA_BITRATE byte = 0xD4 // <uint32>
View Source
const TAG_MEDIA_CODEC byte = 0xD5 // <string>
View Source
const TAG_MEDIA_LENGTH byte = 0xD3 // <uint32> !!!
View Source
const TAG_MEDIA_TITLE byte = 0xD2 // <string>
View Source
const TAG_PARTS byte = 0x17
View Source
const TAG_PART_HASH byte = 0x07
View Source
const TAG_PART_PATH byte = 0x06 // <string>
View Source
const TAG_PERMISSIONS byte = 0x16
View Source
const TAG_PING byte = 0x0C
View Source
const TAG_PORT byte = 0x0F
View Source
const TAG_PREFERENCE byte = 0x0E
View Source
const TAG_PRIORITY byte = 0x13 // <uint32>
View Source
const TAG_PUBLISHINFO byte = 0x33 // <uint32>
View Source
const TAG_QTIME byte = 0x16
View Source
const TAG_SERVERIP byte = 0xFB // <uint32>
View Source
const TAG_SERVERPORT byte = 0xFA // <uint16>
View Source
const TAG_SOURCEIP byte = 0xFE // <uint32>
View Source
const TAG_SOURCEPORT byte = 0xFD // <uint16>
View Source
const TAG_SOURCES byte = 0x15 // <uint32>
View Source
const TAG_SOURCETYPE byte = 0xFF // <uint8>
View Source
const TAG_SOURCEUPORT byte = 0xFC // <uint16>
View Source
const TAG_STATUS byte = 0x14 // <uint32>
View Source
const TAG_TEMPFILE byte = 0x12 // <string>
View Source
const TAG_VERSION byte = 0x11 // <string>

Variables

View Source
var EMULE = ED2KHash{0x31, 0xD6, 0xCF, 0xE0, 0xD1, 0x0E, 0xE9, 0x31, 0xB7, 0x3C, 0x59, 0xD7, 0xE0, 0xC0, 0x6F, 0xC0}
View Source
var LIBED2K = ED2KHash{0x31, 0xD6, 0xCF, 0xE0, 0xD1, 0x4C, 0xE9, 0x31, 0xB7, 0x3C, 0x59, 0xD7, 0xE0, 0xC0, 0x4B, 0xC0}
View Source
var Terminal = ED2KHash{0x31, 0xD6, 0xCF, 0xE0, 0xD1, 0x6A, 0xE9, 0x31, 0xB7, 0x3C, 0x59, 0xD7, 0xE0, 0xC0, 0x89, 0xC0}
View Source
var ZERO = ED2KHash{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}

Functions

func BitsToBytes

func BitsToBytes(count int) int

func DataSize

func DataSize(data interface{}) int

DataSize returns the size of the data required to represent the data when encoded. It returns zero if the type cannot be implemented by the fast path in Read or Write.

func DivCeil64

func DivCeil64(a uint64, b uint64) uint64

func DivCeilInt

func DivCeilInt(a int, b int) int

func InBlockOffset

func InBlockOffset(begin uint64) int

func Min

func Min(a int, b int) int

func NumPiecesAndBlocks

func NumPiecesAndBlocks(offset uint64) (int, int)

func TagId2String

func TagId2String(id byte) string

func TagType2String

func TagType2String(id byte) string

Types

type AddTransferParameters

type AddTransferParameters struct {
	Hashes           HashSet
	Filename         ByteContainer
	Filesize         uint64
	Pieces           BitField
	DownloadedBlocks map[int]BitField
}

func CreateAddTransferParameters

func CreateAddTransferParameters(hash ED2KHash, size uint64, filename string) AddTransferParameters

func (*AddTransferParameters) Get

func (AddTransferParameters) Put

func (AddTransferParameters) Size

func (atp AddTransferParameters) Size() int

func (AddTransferParameters) WantMoreData

func (atp AddTransferParameters) WantMoreData() bool

type BitField

type BitField struct {
	// contains filtered or unexported fields
}

func CloneBitField

func CloneBitField(src BitField) BitField

func CreateBitField

func CreateBitField(bitsCount int) BitField

func (*BitField) Assign

func (bf *BitField) Assign(b []byte, c int)

func (BitField) Bits

func (bf BitField) Bits() int

func (*BitField) ClearAll

func (bf *BitField) ClearAll()

func (*BitField) ClearBit

func (bf *BitField) ClearBit(index int)

func (*BitField) ClearTrailingBits

func (bf *BitField) ClearTrailingBits()

func (BitField) Count

func (bf BitField) Count() int

func (*BitField) Get

func (bf *BitField) Get(sb *StateBuffer) *StateBuffer

func (BitField) GetBit

func (bf BitField) GetBit(index int) bool

func (BitField) Put

func (bf BitField) Put(sb *StateBuffer) *StateBuffer

func (*BitField) Resize

func (bf *BitField) Resize(bits int)

func (*BitField) ResizeVal

func (bf *BitField) ResizeVal(bits int, val bool)

func (*BitField) SetAll

func (bf *BitField) SetAll()

func (*BitField) SetBit

func (bf *BitField) SetBit(index int)

func (BitField) Size

func (bf BitField) Size() int

type ByteContainer

type ByteContainer []byte

func String2ByteContainer

func String2ByteContainer(s string) ByteContainer

func (*ByteContainer) Get

func (bc *ByteContainer) Get(sb *StateBuffer) *StateBuffer

func (ByteContainer) Put

func (bc ByteContainer) Put(sb *StateBuffer) *StateBuffer

func (ByteContainer) Size

func (bc ByteContainer) Size() int

func (ByteContainer) ToString

func (bc ByteContainer) ToString() string

type Collection

type Collection []Serializable

func (*Collection) Get

func (c *Collection) Get(sb *StateBuffer) *StateBuffer

func (Collection) Put

func (c Collection) Put(sb *StateBuffer) *StateBuffer

type CompressedPart

type CompressedPart struct {
	Hash                 ED2KHash
	Offset               uint64
	CompressedDataLength uint32
	Extended             bool
}

func (*CompressedPart) Get

func (cp *CompressedPart) Get(sb *StateBuffer) *StateBuffer

func (*CompressedPart) Put

func (cp *CompressedPart) Put(sb *StateBuffer) *StateBuffer

func (CompressedPart) Size

func (cp CompressedPart) Size() int

type ED2KHash

type ED2KHash [HASH_LEN]byte

func ResultHash

func ResultHash(hashes []ED2KHash) ED2KHash

func String2Hash

func String2Hash(s string) ED2KHash

func (ED2KHash) Equals

func (h ED2KHash) Equals(hash ED2KHash) bool

func (*ED2KHash) Get

func (h *ED2KHash) Get(sb *StateBuffer) *StateBuffer

func (ED2KHash) Put

func (h ED2KHash) Put(sb *StateBuffer) *StateBuffer

func (ED2KHash) Size

func (h ED2KHash) Size() int

func (ED2KHash) ToString

func (h ED2KHash) ToString() string

type Endpoint

type Endpoint struct {
	Ip   uint32
	Port uint16
}

func EndpointFromString

func EndpointFromString(s string) Endpoint

func FromString

func FromString(s string) (Endpoint, error)

func (*Endpoint) Get

func (i *Endpoint) Get(sb *StateBuffer) *StateBuffer

func (Endpoint) IsEmpty

func (ep Endpoint) IsEmpty() bool

func (Endpoint) IsLocalAddress

func (ep Endpoint) IsLocalAddress() bool

func (Endpoint) Put

func (i Endpoint) Put(sb *StateBuffer) *StateBuffer

func (Endpoint) Size

func (i Endpoint) Size() int

func (Endpoint) ToString

func (i Endpoint) ToString() string

type ExtHello

type ExtHello struct {
	Version         byte
	ProtocolVersion byte
	Properties      TagCollection
}

func (*ExtHello) Get

func (eh *ExtHello) Get(sb *StateBuffer) *StateBuffer

func (ExtHello) Put

func (eh ExtHello) Put(sb *StateBuffer) *StateBuffer

func (ExtHello) Size

func (eh ExtHello) Size() int

type FileAnswer

type FileAnswer struct {
	Hash ED2KHash
	Name ByteContainer
}

func (*FileAnswer) Get

func (fa *FileAnswer) Get(sb *StateBuffer) *StateBuffer

func (FileAnswer) Put

func (fa FileAnswer) Put(sb *StateBuffer) *StateBuffer

func (FileAnswer) Size

func (fa FileAnswer) Size() int

type FileStatusAnswer

type FileStatusAnswer struct {
	Hash ED2KHash
	BF   BitField
}

func (*FileStatusAnswer) Get

func (FileStatusAnswer) Put

func (FileStatusAnswer) Size

func (fs FileStatusAnswer) Size() int

type FoundFileSources

type FoundFileSources struct {
	Hash    ED2KHash
	Sources []Endpoint
}

func (*FoundFileSources) Get

func (*FoundFileSources) Put

func (FoundFileSources) Size

func (fs FoundFileSources) Size() int

type GetFileSources

type GetFileSources struct {
	Hash    ED2KHash
	LowPart uint32
	HiPart  uint32
}

func (*GetFileSources) Get

func (GetFileSources) Put

func (gfs GetFileSources) Put(sb *StateBuffer) *StateBuffer

func (GetFileSources) Size

func (gfs GetFileSources) Size() int

type GetServerList

type GetServerList struct{}

func (*GetServerList) Get

func (gl *GetServerList) Get(sb *StateBuffer) *StateBuffer

func (GetServerList) Put

func (gl GetServerList) Put(sb *StateBuffer) *StateBuffer

func (GetServerList) Size

func (gl GetServerList) Size() int

type HashSet

type HashSet struct {
	Hash        ED2KHash
	PieceHashes []ED2KHash
}

func (*HashSet) Get

func (hs *HashSet) Get(sb *StateBuffer) *StateBuffer

func (HashSet) Put

func (hs HashSet) Put(sb *StateBuffer) *StateBuffer

func (HashSet) Size

func (hs HashSet) Size() int

type Hello

type Hello struct {
	HashLength byte
	Answer     HelloAnswer
}

func (*Hello) Get

func (hello *Hello) Get(sb *StateBuffer) *StateBuffer

func (Hello) Put

func (hello Hello) Put(sb *StateBuffer) *StateBuffer

func (Hello) Size

func (hello Hello) Size() int

type HelloAnswer

type HelloAnswer struct {
	Hash        ED2KHash
	Point       Endpoint
	Properties  TagCollection
	ServerPoint Endpoint
}

func (*HelloAnswer) Get

func (ha *HelloAnswer) Get(sb *StateBuffer) *StateBuffer

func (HelloAnswer) Put

func (ha HelloAnswer) Put(sb *StateBuffer) *StateBuffer

func (HelloAnswer) Size

func (ha HelloAnswer) Size() int

type IP

type IP uint32

func (*IP) Get

func (ip *IP) Get(sb *StateBuffer) *StateBuffer

func (IP) Put

func (ip IP) Put(sb *StateBuffer) *StateBuffer

func (IP) Size

func (ip IP) Size() int

type IdChange

type IdChange struct {
	ClientId uint32
	TcpFlags uint32
	AuxPort  uint32
}

func (*IdChange) Get

func (i *IdChange) Get(sb *StateBuffer) *StateBuffer

func (IdChange) Put

func (i IdChange) Put(sb *StateBuffer) *StateBuffer

func (IdChange) Size

func (i IdChange) Size() int

type LoginRequest

type LoginRequest UsualPacket

type MiscOptions

type MiscOptions struct {
	AichVersion         uint32
	UnicodeSupport      uint32
	UdpVer              uint32
	DataCompVer         uint32
	SupportSecIdent     uint32
	SourceExchange1Ver  uint32
	ExtendedRequestsVer uint32
	AcceptCommentVer    uint32
	NoViewSharedFiles   uint32
	MultiPacket         uint32
	SupportsPreview     uint32
}

func (MiscOptions) AsUint32

func (mo MiscOptions) AsUint32() uint32

func (*MiscOptions) Assign

func (mo *MiscOptions) Assign(value uint32)

type MiscOptions2

type MiscOptions2 uint32

func (*MiscOptions2) SetCaptcha

func (mo *MiscOptions2) SetCaptcha()

func (*MiscOptions2) SetExtMultipacket

func (mo *MiscOptions2) SetExtMultipacket()

func (*MiscOptions2) SetLargeFiles

func (mo *MiscOptions2) SetLargeFiles()

func (*MiscOptions2) SetSourceExt2

func (mo *MiscOptions2) SetSourceExt2()

func (MiscOptions2) SupportCaptcha

func (mo MiscOptions2) SupportCaptcha() bool

func (MiscOptions2) SupportExtMultipacket

func (mo MiscOptions2) SupportExtMultipacket() bool

func (MiscOptions2) SupportLargeFiles

func (mo MiscOptions2) SupportLargeFiles() bool

func (MiscOptions2) SupportSourceExt2

func (mo MiscOptions2) SupportSourceExt2() bool

type NumericEntry

type NumericEntry struct {
	// contains filtered or unexported fields
}

func CreateNumericEntry

func CreateNumericEntry(val uint64, id byte, op byte) *NumericEntry

func (*NumericEntry) Get

func (entry *NumericEntry) Get(sb *StateBuffer) *StateBuffer

func (NumericEntry) Put

func (entry NumericEntry) Put(sb *StateBuffer) *StateBuffer

func (NumericEntry) Size

func (entry NumericEntry) Size() int

type OperatorEntry

type OperatorEntry byte

func CreateAnd

func CreateAnd() *OperatorEntry

func CreateNot

func CreateNot() *OperatorEntry

func CreateOr

func CreateOr() *OperatorEntry

func (*OperatorEntry) Get

func (entry *OperatorEntry) Get(sb *StateBuffer) *StateBuffer

func (OperatorEntry) IsBoolean

func (o OperatorEntry) IsBoolean() bool

func (OperatorEntry) Put

func (entry OperatorEntry) Put(sb *StateBuffer) *StateBuffer

func (OperatorEntry) Size

func (entry OperatorEntry) Size() int

type PacketCombiner

type PacketCombiner struct {
	// contains filtered or unexported fields
}

func (*PacketCombiner) Read

func (pc *PacketCombiner) Read(reader io.Reader) (PacketHeader, []byte, error)

type PacketHeader

type PacketHeader struct {
	Protocol byte
	Bytes    uint32
	Packet   byte
}

func (*PacketHeader) Get

func (ph *PacketHeader) Get(sb *StateBuffer) *StateBuffer

func (PacketHeader) IsEmpty

func (ph PacketHeader) IsEmpty() bool

func (PacketHeader) Put

func (ph PacketHeader) Put(sb *StateBuffer) *StateBuffer

func (*PacketHeader) Read

func (ph *PacketHeader) Read(buffer []byte)

func (*PacketHeader) Reset

func (ph *PacketHeader) Reset()

func (PacketHeader) Size

func (ph PacketHeader) Size() int

func (PacketHeader) Write

func (ph PacketHeader) Write(buffer []byte)

type ParenEntry

type ParenEntry byte

func CreateCloseParen

func CreateCloseParen() *ParenEntry

func CreateOpenParen

func CreateOpenParen() *ParenEntry

func (*ParenEntry) Get

func (entry *ParenEntry) Get(*StateBuffer) *StateBuffer

func (ParenEntry) IsBoolean

func (o ParenEntry) IsBoolean() bool

func (ParenEntry) Put

func (entry ParenEntry) Put(*StateBuffer) *StateBuffer

func (ParenEntry) Size

func (entry ParenEntry) Size() uint

type PieceBlock

type PieceBlock struct {
	PieceIndex int
	BlockIndex int
}

func FromOffset

func FromOffset(offset uint64) PieceBlock

func (*PieceBlock) Get

func (pb *PieceBlock) Get(sb *StateBuffer) *StateBuffer

func (PieceBlock) Put

func (pb PieceBlock) Put(sb *StateBuffer) *StateBuffer

func (PieceBlock) Size

func (pb PieceBlock) Size() int

func (PieceBlock) Start

func (pb PieceBlock) Start() uint64

func (PieceBlock) ToString

func (pb PieceBlock) ToString() string

type RequestParts32

type RequestParts32 struct {
	Hash        ED2KHash
	BeginOffset [PARTS_IN_REQUEST]uint32
	EndOffset   [PARTS_IN_REQUEST]uint32
}

func (*RequestParts32) Get

func (rp *RequestParts32) Get(sb *StateBuffer) *StateBuffer

func (RequestParts32) Put

func (rp RequestParts32) Put(sb *StateBuffer) *StateBuffer

func (RequestParts32) Size

func (rp RequestParts32) Size() int

type RequestParts64

type RequestParts64 struct {
	Hash        ED2KHash
	BeginOffset [PARTS_IN_REQUEST]uint64
	EndOffset   [PARTS_IN_REQUEST]uint64
}

func (*RequestParts64) Get

func (rp *RequestParts64) Get(sb *StateBuffer) *StateBuffer

func (RequestParts64) Put

func (rp RequestParts64) Put(sb *StateBuffer) *StateBuffer

func (RequestParts64) Size

func (rp RequestParts64) Size() int

type SearchItem

type SearchItem struct {
	H               ED2KHash
	Point           Endpoint
	Filename        string
	Filesize        uint64
	Sources         int
	CompleteSources int
	Bitrate         int
	MediaLength     int
	Codec           string
}

func ToSearchItem

func ToSearchItem(up *UsualPacket) SearchItem

type SearchMore

type SearchMore struct{}

func (*SearchMore) Get

func (sm *SearchMore) Get(*StateBuffer) *StateBuffer

func (SearchMore) Put

func (sm SearchMore) Put(sb *StateBuffer) *StateBuffer

func (SearchMore) Size

func (sm SearchMore) Size() int

type SearchRequest

type SearchRequest []Serializable

func PackRequest

func PackRequest(source []Serializable) (SearchRequest, error)

func (*SearchRequest) Get

func (SearchRequest) Put

func (sr SearchRequest) Put(sb *StateBuffer) *StateBuffer

func (SearchRequest) Size

func (sr SearchRequest) Size() int

type SearchResult

type SearchResult struct {
	Items       []UsualPacket
	MoreResults byte
}

func (*SearchResult) Get

func (sr *SearchResult) Get(sb *StateBuffer) *StateBuffer

func (SearchResult) Put

func (SearchResult) Size

func (sr SearchResult) Size() int

type SendingPart

type SendingPart struct {
	Hash     ED2KHash
	Begin    uint64
	End      uint64
	Extended bool
}

func (*SendingPart) Get

func (sp *SendingPart) Get(sb *StateBuffer) *StateBuffer

func (*SendingPart) Put

func (sp *SendingPart) Put(sb *StateBuffer) *StateBuffer

func (SendingPart) Size

func (sp SendingPart) Size() int

type Serializable

type Serializable interface {
	Get(sr *StateBuffer) *StateBuffer
	Put(sr *StateBuffer) *StateBuffer
}

func BuildEntries

func BuildEntries(minSize uint64,
	maxSize uint64,
	sourcesCount uint32,
	completeSourcesCount uint32,
	fileType string,
	fileExtension string,
	codec string,
	mediaLength uint32,
	mediaBitrate uint32,
	value string) ([]Serializable, error)

type SerializableNumber

type SerializableNumber interface {
	Get(sr *StateBuffer) *StateBuffer
	Put(sr *StateBuffer) *StateBuffer
	AsInteger() uint32
}

type Some

type Some struct {
	Ip   uint16
	Port uint16
}

func (*Some) Get

func (s *Some) Get(sb *StateBuffer) *StateBuffer

func (*Some) Put

func (s *Some) Put(sb *StateBuffer) *StateBuffer

type StateBuffer

type StateBuffer struct {
	Data []byte
	// contains filtered or unexported fields
}

func (StateBuffer) Error

func (sw StateBuffer) Error() error

func (StateBuffer) Offset

func (sw StateBuffer) Offset() int

func (*StateBuffer) Read

func (sb *StateBuffer) Read(data interface{}) *StateBuffer

func (*StateBuffer) ReadUint16

func (sb *StateBuffer) ReadUint16() uint16

func (*StateBuffer) ReadUint32

func (sb *StateBuffer) ReadUint32() uint32

func (*StateBuffer) ReadUint64

func (sb *StateBuffer) ReadUint64() uint64

func (*StateBuffer) ReadUint8

func (sb *StateBuffer) ReadUint8() uint8

func (StateBuffer) Remain

func (sb StateBuffer) Remain() int

func (*StateBuffer) Write

func (sb *StateBuffer) Write(data interface{}) *StateBuffer

type Status

type Status struct {
	UsersCount uint32
	FilesCount uint32
}

func (*Status) Get

func (s *Status) Get(sb *StateBuffer) *StateBuffer

func (Status) Put

func (s Status) Put(sb *StateBuffer) *StateBuffer

func (Status) Size

func (s Status) Size() int

type StringEntry

type StringEntry struct {
	// contains filtered or unexported fields
}

func CreateStringEntry

func CreateStringEntry(val string, id byte) *StringEntry

func CreateStringEntryNoTag

func CreateStringEntryNoTag(val string) *StringEntry

func (*StringEntry) Get

func (entry *StringEntry) Get(sb *StateBuffer) *StateBuffer

func (StringEntry) Put

func (entry StringEntry) Put(sb *StateBuffer) *StateBuffer

func (StringEntry) Size

func (entry StringEntry) Size() int

type Tag

type Tag struct {
	Type byte
	Id   byte
	Name string
	// contains filtered or unexported fields
}

func CreateTag

func CreateTag(data interface{}, id byte, name string) Tag

func (Tag) AsBlob

func (t Tag) AsBlob() []byte

func (Tag) AsBool

func (t Tag) AsBool() bool

func (Tag) AsByte

func (t Tag) AsByte() byte

func (Tag) AsFloat

func (t Tag) AsFloat() float32

func (Tag) AsHash

func (t Tag) AsHash() []byte

func (Tag) AsInt

func (t Tag) AsInt() int

func (Tag) AsString

func (t Tag) AsString() string

func (Tag) AsUint16

func (t Tag) AsUint16() uint16

func (Tag) AsUint32

func (t Tag) AsUint32() uint32

func (Tag) AsUint64

func (t Tag) AsUint64() uint64

func (*Tag) Get

func (t *Tag) Get(sr *StateBuffer) *StateBuffer

func (Tag) GetName

func (t Tag) GetName() string

func (Tag) IsBlob

func (t Tag) IsBlob() bool

func (Tag) IsBool

func (t Tag) IsBool() bool

func (Tag) IsByte

func (t Tag) IsByte() bool

func (Tag) IsFloat

func (t Tag) IsFloat() bool

func (Tag) IsHash

func (t Tag) IsHash() bool

func (Tag) IsString

func (t Tag) IsString() bool

func (Tag) IsUint16

func (t Tag) IsUint16() bool

func (Tag) IsUint32

func (t Tag) IsUint32() bool

func (Tag) IsUint64

func (t Tag) IsUint64() bool

func (Tag) Put

func (t Tag) Put(sw *StateBuffer) *StateBuffer

func (Tag) Size

func (t Tag) Size() int

type TagCollection

type TagCollection []Tag

func (*TagCollection) Get

func (c *TagCollection) Get(sb *StateBuffer) *StateBuffer

func (TagCollection) Put

func (TagCollection) Size

func (c TagCollection) Size() int

type UsualPacket

type UsualPacket struct {
	Hash       ED2KHash
	Point      Endpoint
	Properties TagCollection
}

func (*UsualPacket) Get

func (up *UsualPacket) Get(sb *StateBuffer) *StateBuffer

func (UsualPacket) Put

func (up UsualPacket) Put(sb *StateBuffer) *StateBuffer

func (UsualPacket) Size

func (up UsualPacket) Size() int

Jump to

Keyboard shortcuts

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