| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(<server>)[request-close?/box]: New field.
(disconnect!): Set new box before signalling the condition.
(reconnect)[error-handler]{input:regular-end-of-file,input:premature-end-of-file}:
When the new box holds #t as value, don't reconnect.
(connect): Adjust callers.
* tests/network-size.scm
("close, connected --> all fibers stop, two callbacks called"): New test.
|
|
|
|
|
|
|
|
| |
'connect' always sets it, so it doesn't need to be set here
as well. This also prevents accidentally calling 'spawn-fiber' to
a degree.
* gnu/gnunet/nse/client.scm (reconnect): Remove default for 'spawn'.
|
|
|
|
|
|
|
| |
For better error handling
* gnu/gnunet/nse/client.scm (connect): Remove 'rest'. Adjust call to
'reconnect'.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm (reconnect): Spawn 'request-close-handler'
with 'spawn' instead of 'spawn-fiber'.
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(reconnect)[error-handler]{else}: New branch, reporting
the error and closing the queue.
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(estimate:logarithmic-number-peers,estimate:standard-deviation)
(estimate:number-peers): Remove resolved XXX.
(reconnect)[handlers]<msg:nse:estimate>{well-formed?}: Verify
'size-estimate' and 'std-deviation' fields.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(reconnect)[error-handler]: Remove TODO about reconnecting.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm (<server>)[estimate/box]:
Correct type in comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(<server>)[request-close-condition]: New field
(disconnect!): New procedure.
(reconnect): Add 'request-close-condition' argument.
(reconnect)[request-close-handler]: New procedure.
(reconnect): Spawn 'request-close-handler'.
(connect)[request-close-condition]: New variable.
(connect): Use new variable.
* tests/utils.scm: Export 'call-with-temporary-directory'.
* tests/network-size.scm
("close, not connected --> all fibers stop, no callbacks called"):
New test.
|
|
|
|
|
| |
* doc/scheme-gnunet.tm (Estimation of the size of the network):
Document that the module will retry after a disconnect.
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(reconnect): Extract from ...
(connect): ... here.
|
|
|
|
|
|
|
|
|
| |
This addresses a theoretical race condition.
* gnu/gnunet/nse/client.scm
(connect)[mq-defined]: New variable.
(connect)[error-handler]: Wait on new variable.
(connect)[mq]: Signal new condition after 'mq' is defined.
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(<server>): Remove 'mq', 'config', 'connected-callback',
'disconnected-callback' and 'estimate-update-callback'.
(estimate): Adjust call to constructor appropriately.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(connect): Add 'disconnected' optional keyword argument. Document
it.
(connect)[error-handler]: In case of input:regular-end-of-file and
input:premature-end-of-file, call 'disconnected'.
(<server>)[disconnected]: New field.
* tests/network-size.scm
("notify disconnected after end-of-file, after 'connected'"):
New test.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm (connect)[handlers]: Use the
'message-handler' macro instead of the corresponding procedure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At least for sockets and pipes (TTYs might be different),
end of files only happen at the end of file, and at most once.
* tests/mq-stream.scm
(connect/test)[error-handler]: Don't handle
input:regular-end-of-file.
* gnu/gnunet/nse/client.scm
(connect)[error-handler]: Remove TODO on connection:lost,
add some TODO to input:regular-end-of-file.
* gnu/gnunet/mq-impl/stream.scm
(write-envelope!): Add TODO about closed output ports.
(connect/fibers): Add documentation on closed ports, add TODO
about closed ports.
* README.org (List of errors): Remove TODO about connection:lost.
Add documentation about input:regular-end-of-file.
|
|
|
|
|
| |
* gnu/gnunet/nse/client.scm
(connect): Document 'updated' and 'connected' are optional.
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes: https://notabug.org/maximed/scheme-gnunet/issues/4
* gnu/gnunet/nse/client.scm
(connect)[handle-estimate]: Only call 'updated' if it isn't false.
* tests/network-size.scm
(act-as-the-server, estimate->list): Extract from
"Client calls call-back (and sets estimates) in-order".
("likewise, without 'updated' or 'connected' (issue 4)"): Test it.
|
|
|
|
|
| |
* gnu/gnunet/nse/struct.scm (/:msg:nse:estimate)[timestamp]: Add a
synopsis.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile.am
(modules): Add new module.
(SCM_TESTS): Add new tests.
* README.org
(GNUnet network structures): Move entry about 'nse/struct.scm' ...
(Network size estimation): ... to here.
(Network size estimation): New section. Note existence of
new module.
* gnu/gnunet/nse/client.scm: New module
* tests/network-size.scm: Test it.
|
|
|
|
|
|
| |
* gnu/gnunet/nse/struct.scm: Import '/time-absolute',
'/ecc-signature-purpose' and 'ieee-double/big' from
appropriate modules.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In contrast to scheme-bytestructures and
(gnu gnunet utils netstruct), this allows associating
a synopsis, a documention string (docstring) and arbitrary
properties with structures and fields.
Code compilation should be faster now as well and the
compiled '.go' should be smaller due to less excessive
use of syntax-rules.
TODO: update old modules
* Makefile.am (modules): compile new modules
gnu/gnunet/netstruct/procedural.scm and
gnu/gnunet/netstruct/syntactic.scm.
* README.org (Network Structures): document new modules.
* gnu/gnunet/crypto/struct.scm: use new module.
* gnu/gnunet/hashcode/struct.scm: likewise.
* gnu/gnunet/nse/struct.scm: likewise.
* gnu/gnunet/util/struct.scm: likewise.
* gnu/gnunet/netstruct/procedural.scm: new module
for defining and using network structures
procedurally.
* gnu/gnunet/netstruct/syntactic.scm: likewise,
but syntactically and with some inlining.
|
|
* gnu/gnunet/nse/struct.scm: new module,
defining some NSE network structures.
* Makefile.am (modules): compile it.
|