306 Commits

Author SHA1 Message Date
Mark Nadal
615a0f7fff patch map, add src 2017-02-04 00:20:17 -08:00
Mark Nadal
34c12a537d correct input layout 2017-02-03 16:22:29 -08:00
Mark Nadal
30bbcc1de2 fixed map and @stefdv stuff 2017-02-03 16:17:31 -08:00
Mark Nadal
ebabc80714 looking good! one last node 2017-02-03 16:08:14 -08:00
Mark Nadal
00552bd89a before impulsive behavior 2017-02-02 01:56:00 -08:00
Mark Nadal
b4b6743eaa fix implicit 2017-01-29 03:27:46 -08:00
Mark Nadal
122890b42d fix not 2017-01-29 00:04:37 -08:00
Mark Nadal
b03f6e0de8 put as merge 2017-01-27 22:12:50 -08:00
Mark Nadal
40c991426b launching 0.5! 2017-01-27 07:40:24 -08:00
Mark Nadal
583cb06f37 temporarily (because of jesse) drop Node v0.1 and below 2017-01-27 07:16:51 -08:00
Mark Nadal
d0bbcef285 0.5! 2017-01-27 06:27:04 -08:00
Mark Nadal
4a2a845458 launching! 2017-01-27 05:23:49 -08:00
Mark Nadal
77d71a0c94 pushing! 2017-01-27 04:58:16 -08:00
Mark Nadal
37ac5e28e4 we should push 2017-01-27 03:34:16 -08:00
Mark Nadal
377fa7900f clean up 2017-01-21 22:06:56 -08:00
Mark Nadal
9002593435 looking good 2017-01-21 18:13:34 -08:00
Mark Nadal
e141a4c240 Update gun.js 2017-01-20 20:30:19 -08:00
Mark Nadal
8c426553d7 Update gun.js 2017-01-11 10:38:10 -08:00
Mark Nadal
bd0e6a615f Update gun.js 2017-01-03 09:40:47 -08:00
Mark Nadal
de9c6ce1ae Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-12-30 19:23:20 -08:00
Mark Nadal
7291263426 repull and test 2016-12-30 19:23:16 -08:00
d3x0r
751ac3b230 pass wsc options to client gun create ( wsc:protocols especially, since that translates to the optional parameter in the standard client websocket constructor ) 2016-12-21 15:03:10 -08:00
Mark Nadal
631eb6d023 mostly working solution to orphan-child-unsubscribe-from-table problem, although causality questions, going to try another idea. 2016-12-19 23:58:30 -08:00
Mark Nadal
2e7b87c3b9 Update gun.js 2016-12-19 20:57:07 -08:00
Mark Nadal
44fa4f3252 Update gun.js 2016-12-19 20:30:42 -08:00
Mark Nadal
5ade1b6773 idea for solution 2016-12-17 23:54:32 -08:00
Mark Nadal
bdcea8c0d1 Update gun.js 2016-12-17 21:56:15 -08:00
Mark Nadal
ef89785525 Update gun.js 2016-12-17 14:01:58 -08:00
Mark Nadal
53d5417d4a Update gun.js 2016-12-17 12:25:36 -08:00
Mark Nadal
02381a123d so much 2016-12-15 16:17:50 -08:00
Jesse Gibson
a566572a2d Shallow copy constructor options
Previously constructor options were deeply copied, which caused
issues with 3rd party plugins when they pass "class" instances as
options (since instances were copied into POJOs, breaking the prototype
chain). Now it's shallow copied. Special treatment is still given for
the `peers` property.
2016-12-15 15:35:11 -07:00
Jesse Gibson
ba673f73f8 Attempt reconnect on disconnect
Previously, the client websocket layer would only attempt a reconnection
if there were pending messages in the queue. Now it will always attempt
a reconnection, solving most of issue #259 (although not completely, as
reconnects are susceptible to race conditions).
2016-12-13 13:37:43 -07:00
Jesse Gibson
304265e193 Pass backoff options from constructor
The Client constructor supports backoff configuration. This commit
exposes it to the end developer via the `peers` options object, in the
`backoff` property.
Example:

Gun({
  peers: {
    'url.com/gun': {
      backoff: { max: 1000, factor: 0.2 }
    }
  }
})
2016-12-12 16:24:51 -07:00
Jesse Gibson
30fe844cab Check JSON support just once
Two separate modules (localStorage & websockets) ensured JSON was
globally defined. Since only one is needed to alert the user, the
other has been removed.
2016-12-12 16:10:39 -07:00
Jesse Gibson
bb65acab10 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-12-12 15:12:41 -07:00
Jesse Gibson
01c93157cb Fix msg passing, add reconnect & backoff
Fixed broadcast storm caused by re-enveloping the same message and
re-emitting it (I passed the envelope to gun, not just the msg body).
Sockets will attempt an exponential reconnect if the message queue isn't
empty, otherwise they're still just lazy bums that only open when
needed.
JSONP wasn't working before I took on this project, but now it's
completely disconnected. Once it's working, it should go in the
`request` function as a websocket fallback.
2016-12-12 14:37:09 -07:00
Mark Nadal
9f7acfd27f Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-12-09 18:20:45 -08:00
Mark Nadal
0779e32544 merged? Maybe? 2016-12-09 18:20:16 -08:00
Mark Nadal
69d1e81fc9 Update gun.js 2016-12-09 18:13:25 -08:00
Mark Nadal
34eb293a63 be brave, clean up 2016-12-06 23:48:10 -08:00
Jesse Gibson
b352cd742a Update client WebSocket plugin
Lovely little abstraction layer over websockets sends messages using
gun's new envelope system. Exponential backoff has not been
implemented yet. If the socket fails to connect, it won't retry (yet).
Also, this update left some dead code with the jsonp implementation.
Soon that should be ported over to the new envelope system too, but now
it's disconnected from gun.
2016-12-01 16:51:35 -07:00
Mark Nadal
dd72a24740 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-11-29 20:20:32 -08:00
Mark Nadal
111d0f5bda instance specific dedup for @d3x0r 2016-11-29 20:19:59 -08:00
Mark Nadal
bd960b4d67 thanks to @Stefdv #284 2016-11-29 11:35:20 -08:00
Mark Nadal
ce32d8414b ahem, thank you d3x0r 2016-11-28 20:31:27 -08:00
Mark Nadal
3e2bf996fa final touches 2016-11-28 19:40:39 -08:00
Mark Nadal
9abe3fb75f fix for d3x0r and Stefdv 2016-11-28 17:57:20 -08:00
Jesse Gibson
4848493530 Add envelope-system server sync
Using gun's new envelope system (where routing and de-duplication happen
inside gun core), server-to-server synchronization has been
implemented.
However, it comes with this warning: the chain isn't yet ready and
you'll have difficulty reading or writing data via the chain.
2016-11-25 14:42:44 -07:00
Jesse Gibson
9d9dea2553 Add envelope plugin system
@amark made these changes, I'm just committing them.
2016-11-25 09:49:48 -07:00
Mark Nadal
c8e919f287 fix chain 2016-11-22 18:07:49 -08:00