Link getdata to inv

This commit is contained in:
Kagami Hiiragi 2015-01-16 00:07:49 +03:00
parent 73d2ad393a
commit 51974d4666
2 changed files with 13 additions and 3 deletions

View File

@ -41,7 +41,7 @@ API documentation is available [here](https://bitchan.github.io/bitmessage/docs/
- [x] verack - [x] verack
- [x] addr - [x] addr
- [x] inv - [x] inv
- [ ] getdata - [x] getdata
- [ ] error - [ ] error
- [ ] object - [ ] object
- [ ] Object types - [ ] Object types
@ -58,10 +58,10 @@ API documentation is available [here](https://bitchan.github.io/bitmessage/docs/
- [x] getRipe - [x] getRipe
- [x] fromRandom - [x] fromRandom
- [ ] fromPassphrase - [ ] fromPassphrase
- [x] UserAgent
- [ ] Message - [ ] Message
- [ ] encrypt - [ ] encrypt
- [ ] decrypt - [ ] decrypt
- [x] UserAgent
- [ ] Parse PyBitmessage configs - [ ] Parse PyBitmessage configs
- [ ] keys.dat - [ ] keys.dat
- [ ] knownnodes.dat - [ ] knownnodes.dat

View File

@ -144,8 +144,9 @@ exports.addr = {
* more objects. * more objects.
* @see {@link https://bitmessage.org/wiki/Protocol_specification#inv} * @see {@link https://bitmessage.org/wiki/Protocol_specification#inv}
* @namespace * @namespace
* @static
*/ */
exports.inv = { var inv = exports.inv = {
/** /**
* Decode `inv` payload. * Decode `inv` payload.
* @param {Buffer} buf - Buffer that starts with encoded `inv` payload * @param {Buffer} buf - Buffer that starts with encoded `inv` payload
@ -180,3 +181,12 @@ exports.inv = {
return Buffer.concat([structs.var_int.encode(inventory.length), invBuf]); return Buffer.concat([structs.var_int.encode(inventory.length), invBuf]);
}, },
}; };
/**
* `getdata` message. `getdata` is used in response to an `inv` message
* to retrieve the content of a specific object after filtering known
* elements.
* @see {@link https://bitmessage.org/wiki/Protocol_specification#getdata}
* @namespace
*/
exports.getdata = inv;