api.md: fix some typos
This commit is contained in:
parent
3f878fb981
commit
194f0be471
28
docs/api.md
28
docs/api.md
|
@ -133,9 +133,9 @@ optional arguments:
|
||||||
* `welcome_handler`: this is a function that will be called when the
|
* `welcome_handler`: this is a function that will be called when the
|
||||||
Rendezvous Server's "welcome" message is received. It is used to display
|
Rendezvous Server's "welcome" message is received. It is used to display
|
||||||
important server messages in an application-specific way.
|
important server messages in an application-specific way.
|
||||||
* `app_versions`: this can accept a dictionary (JSON-encodable) of data that
|
* `versions`: this can accept a dictionary (JSON-encodable) of data that will
|
||||||
will be made available to the peer via the `got_version` event. This data
|
be made available to the peer via the `got_version` event. This data is
|
||||||
is delivered before any data messages, and can be used to indicate peer
|
delivered before any data messages, and can be used to indicate peer
|
||||||
capabilities.
|
capabilities.
|
||||||
|
|
||||||
## Code Management
|
## Code Management
|
||||||
|
@ -386,10 +386,10 @@ those Deferreds.
|
||||||
that *someone* has used the correct wormhole code; if someone used the
|
that *someone* has used the correct wormhole code; if someone used the
|
||||||
wrong code, the VERSION message cannot be decrypted, and the wormhole will
|
wrong code, the VERSION message cannot be decrypted, and the wormhole will
|
||||||
be closed instead.
|
be closed instead.
|
||||||
* version (`yield w.when_version()` / `dg.wormhole_version(version)`:
|
* version (`yield w.when_version()` / `dg.wormhole_version(versions)`: fired
|
||||||
fired when the VERSION message arrives from the peer. This fires at the
|
when the VERSION message arrives from the peer. This fires at the same time
|
||||||
same time as `verified`, but delivers the "app_versions" data (passed into
|
as `verified`, but delivers the "app_versions" data (as passed into
|
||||||
`wormhole.create`) instead of the verifier string.
|
`wormhole.create(versions=)`) instead of the verifier string.
|
||||||
* received (`yield w.when_received()` / `dg.wormhole_received(data)`: fired
|
* received (`yield w.when_received()` / `dg.wormhole_received(data)`: fired
|
||||||
each time a data message arrives from the peer, with the bytestring that
|
each time a data message arrives from the peer, with the bytestring that
|
||||||
the peer passed into `w.send(data)`.
|
the peer passed into `w.send(data)`.
|
||||||
|
@ -490,18 +490,18 @@ in python3):
|
||||||
## Full API list
|
## Full API list
|
||||||
|
|
||||||
action | Deferred-Mode | Delegated-Mode
|
action | Deferred-Mode | Delegated-Mode
|
||||||
-------------------------- | -------------------- | --------------
|
------------------ | -------------------- | --------------
|
||||||
w.generate_code(length=2) | |
|
w.generate_code() | |
|
||||||
w.set_code(code) | |
|
w.set_code(code) | |
|
||||||
h=w.input_code() | |
|
h=w.input_code() | |
|
||||||
| d=w.when_code() | dg.wormhole_code(code)
|
. | d=w.when_code() | dg.wormhole_code(code)
|
||||||
| d=w.when_verified() | dg.wormhole_verified(verifier)
|
. | d=w.when_verified() | dg.wormhole_verified(verifier)
|
||||||
| d=w.when_version() | dg.wormhole_version(version)
|
. | d=w.when_version() | dg.wormhole_version(version)
|
||||||
w.send(data) | |
|
w.send(data) | |
|
||||||
| d=w.when_received() | dg.wormhole_received(data)
|
. | d=w.when_received() | dg.wormhole_received(data)
|
||||||
key=w.derive_key(purpose, length) | |
|
key=w.derive_key(purpose, length) | |
|
||||||
w.close() | | dg.wormhole_closed(result)
|
w.close() | | dg.wormhole_closed(result)
|
||||||
| d=w.close() |
|
. | d=w.close() |
|
||||||
|
|
||||||
|
|
||||||
## Dilation
|
## Dilation
|
||||||
|
|
Loading…
Reference in New Issue
Block a user