34 Commits

Author SHA1 Message Date
keks
7dd4e0bfeb vet
used for range variable inside goroutine, now passed as argument
2018-01-13 12:12:21 +02:00
keks
1945f895a2 log when validator discards message 2018-01-13 12:12:21 +02:00
keks
930f264a27 typedef subscription options and fix typo 2018-01-13 12:12:21 +02:00
keks
647bb98655 optionally allow caller to validate messages 2018-01-13 12:12:21 +02:00
vyzo
95dce910ba narrow the message seqno to 64bit again
Uses the atomic counter initialized at instantiation time, which saves
a few bytes and a syscall per message.
2018-01-03 20:30:28 +02:00
vyzo
8a31b41b4c use atomic counter for message seqnos; timestamp is insufficient 2018-01-03 11:25:20 +02:00
Steven Allen
56ea7752e8 better worker cleanup
1. Don't hang marking a peer as dead if we're shutting down.
2. No need to "drain" the outgoing channel anymore. This may have been necessary
to prevent a deadlock where the main loop blocked on sending on sending a
message while we waited to tell the main loop that the peer was dead. However,
this is no longer an issue (we never block on sending).
2017-10-14 11:19:21 -07:00
Steven Allen
d1d3a55404 Merge pull request #34 from libp2p/fix/go-ipfs/4066
drop messages to slow peers
2017-09-04 16:24:19 -07:00
Garrett Thornburg
2ac19f2157 Drop announce messages to peers when their buffer is full 2017-09-01 23:10:06 -04:00
Garrett Thornburg
63c977c815 Return false when we haven't subscribed to anything 2017-09-01 21:16:41 -04:00
Steven Allen
e7faa78d7c log when dropping messages 2017-08-29 19:42:33 -07:00
Steven Allen
02b9c5724d drop messages to slow peers
Instead of spawning a go routine for every message sent to every peer, buffer
them (actually, we already buffer 32 so this didn't need to be changed) and drop
messages when the buffer fills up.

fixes https://github.com/ipfs/go-ipfs/issues/4066

(writing to a channel in a go routine can be dangerous...)
2017-08-29 19:11:58 -07:00
Jeromy
25ef943eea change from field to bytes to avoid json marshalling corruption 2017-01-09 09:52:07 -08:00
Jan Winkelmann
ae48a15d7b make Subscribe go through SubscribeByTopicDescriptor 2016-11-18 02:23:38 +01:00
Jan Winkelmann
1c9a576526 Test, SubscribeByTopicDescriptor and minor improvement 2016-11-18 02:23:38 +01:00
Jan Winkelmann
3a30ab4c17 comments 2016-11-18 02:23:38 +01:00
Jan Winkelmann
b71e3adbd7 first cleanup wave 2016-11-18 02:23:38 +01:00
Jan Winkelmann
822640a482 multiple subscriptions prototype 2016-11-18 02:23:38 +01:00
Jeromy
a8a29fa17e refactor to use multiple feeds 2016-11-18 02:23:38 +01:00
Jeromy
4dfbdcdca7 add functionality to query which peers have a given topic 2016-10-18 11:13:23 -07:00
Jeromy
90657d5d53 update dependencies 2016-10-05 12:47:20 -07:00
Jeromy
6271c7f8b8 fix handling of new streams on peer reconnects 2016-07-27 00:35:41 -07:00
Jeromy
59af8f38e7 add a method to get the pubsub peers list 2016-09-14 18:07:30 -07:00
Jeromy
28f2c2f094 add way to query subscribed topics 2016-09-14 15:11:41 -07:00
Jeromy
a16546a7ee move code to libp2p repo 2016-09-12 20:10:48 -07:00
Jeromy
dd331f38c6 more code cleanup, remove debug statements, add support for multiple
messages and topics
2016-09-12 13:22:16 -07:00
Jeromy
ab2fef7c1b refactor publish messaging 2016-09-11 13:56:07 -07:00
Jeromy
f3f2cb2c82 use timecache 2016-09-10 20:47:12 -07:00
Jeromy
17e835cd17 respect contexts better 2016-09-10 16:03:53 -07:00
Jeromy
c0d5b0ef26 using protobuf now, with a vengeance 2016-09-10 08:29:06 -07:00
Jeromy
6ed3d545e1 switch over to protobuf rpc 2016-09-10 08:14:17 -07:00
Jeromy
13a46da42f Gx publish 0.1.0 2016-09-10 06:56:11 -07:00
Jeromy
001dc0305b encode peerID in base64 for messages over base58 2016-09-10 06:26:09 -07:00
Jeromy
e07f002705 rename to floodsub 2016-09-09 20:13:50 -07:00