Commit Graph

214 Commits

Author SHA1 Message Date
vyzo
7eee7c00a6 add support for transient connections 2021-02-17 11:25:32 +02:00
Aarsh Shah
410e6bdbd0
more docs for stream fncs (#183) 2021-02-16 12:08:51 -08:00
Steven Allen
adcd724744
refactor: use a helper type to decode AddrInfo from JSON (#178)
This saves us a bunch of error prone manual decode/encode logic.

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2021-02-16 12:06:38 -08:00
Aarsh Shah
31daef6c63
fix stream docs (#182) 2021-02-15 17:09:00 +05:30
Aarsh Shah
6cea734154
context to force direct dial (#181) 2021-02-15 13:20:04 +05:30
Aarsh Shah
a7d9ced9f9
Secure Muxer Interface (#180) 2021-02-14 17:45:11 +05:30
Marten Seemann
83ac1d370d
add a context to OpenStream and NewStream (#172)
* add a context to MuxedConn.OpenStream

* add a context to Conn.NewStream
2020-12-19 09:36:59 +07:00
Max Inden
a39b84ea2e
sec/insecure/insecure.go: Fix typo (#167)
`SecureInbound` secures an inbound and not an outbound connection.
2020-09-18 19:38:38 +02:00
Steven Allen
d6afc690e1
add CloseRead/CloseWrite on streams (#166)
* add CloseRead/CloseWrite on streams

This changes the behavior of `Close` to behave as one would expect: it closes
the stream. The new methods, CloseWrite/CloseRead allow for closing the stream in
a single direction.

Note: This _does not_ implement CancelWrite/CancelRead as our stream muxer
_protocols_ don't support that.

fixes #9

* remove stream util helpers

FullClose and AwaitEOF were introduced to work around the fact that calling
Close on a stream only closed the write half. All users must adapt their code
to the new interfaces, so this change is intentionally breaking.
2020-09-01 17:29:54 -07:00
Tarun Bansal
b77fd280f2
Fix typo in docs (#163)
There was a typo in doc for `ProtocolID` alias
2020-08-08 14:40:23 +03:00
Raúl Kripalani
98f9714258
upgrade deps. (#161) 2020-07-30 10:39:34 +01:00
Raúl Kripalani
9cf214f501 go mod tidy. 2020-06-05 12:30:24 +01:00
Raúl Kripalani
21efed7519
experimental introspection support (#159)
Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
Co-authored-by: Raúl Kripalani <raul@protocol.ai>
2020-06-05 12:24:56 +01:00
vyzo
0d53a5522e
connmgr: add IsProtected interface (#158) 2020-06-03 22:08:48 +03:00
Raúl Kripalani
264788628f
eventbus: add wildcard subscription type; getter to enumerate known types (#153) 2020-05-20 18:52:50 +01:00
Raúl Kripalani
30bf48c8d6
events: add a generic DHT event. (#154) 2020-05-20 13:12:54 +01:00
dependabot-preview[bot]
acf0d3d15a
build(deps): bump github.com/multiformats/go-multiaddr from 0.2.1 to 0.2.2 (#152) 2020-05-18 11:43:10 +01:00
Raúl Kripalani
a1c90aa3df
decaying tags: support removal and closure. (#151) 2020-05-15 09:27:13 +01:00
Raúl Kripalani
e74305c1ec minor godoc fixes. 2020-05-14 17:24:23 +01:00
Raúl Kripalani
65c8515256 minor godoc fixes. 2020-05-14 17:22:11 +01:00
Raúl Kripalani
9d35da1374
implement Stringer for network.{Direction,Connectedness,Reachability}. (#150) 2020-05-14 17:16:17 +01:00
dependabot-preview[bot]
e3a456b253
build(deps): bump github.com/libp2p/go-openssl from 0.0.4 to 0.0.5 (#149) 2020-05-14 16:53:30 +01:00
Raúl Kripalani
e5edab11ef
connmgr: introduce abstractions and functions for decaying tags. (#104) 2020-05-14 15:54:39 +01:00
Aarsh Shah
1c39960696
Merge pull request #148 from libp2p/feat/supports-alloc
Interface to verify if a peer supports a protocol without making allocations.
2020-05-14 16:18:09 +05:30
Aarsh Shah
909c77480f
add connection gating interfaces and types. (#139) 2020-05-13 13:15:38 +01:00
Aarsh Shah
dabf5bbfb0 changes as per review 2020-05-11 13:00:05 +05:30
Aarsh Shah
98b95a4877 non alloc version 2020-05-08 11:54:39 +05:30
Aarsh Shah
43dfa5faf4 check if peer supports a protocol without allocation 2020-05-08 11:47:54 +05:30
Steven Allen
a4b837bc12
Merge pull request #147 from libp2p/feat/subscribes-to-events
feat: add a function to tell if a context subscribes to query events
2020-04-29 13:21:46 -07:00
Steven Allen
5d9ec0280b feat: add a function to tell if a context subscribes to query events
This can save us some work if the caller doesn't actually care about these events.
2020-04-29 13:11:46 -07:00
Steven Allen
a14197ce56
Merge pull request #145 from libp2p/fix/by-pointer
fix: envelop contains a mutex and can't be copied.
2020-04-24 18:36:42 -07:00
Steven Allen
744b95d7d8 fix: envelop contains a mutex and can't be copied. 2020-04-24 18:34:03 -07:00
Steven Allen
970fe32cba
Merge pull request #141 from libp2p/fix/reachability-type
fix: use correct reachability type
2020-04-13 11:02:00 -07:00
Steven Allen
4cb536b589 fix: use correct reachability type 2020-04-13 10:42:57 -07:00
Steven Allen
9d9170e9d8
Merge pull request #134 from edjx/feat/peer-records-pb-conv
PeerRecord: Add ToProtobuf() to get a PeerRecord's equivalent protobuf struct
2020-04-13 09:25:53 -07:00
Steven Allen
eb00c1a72e
Merge pull request #140 from libp2p/docs/routing
doc(routing): document count
2020-04-09 11:05:31 -07:00
Steven Allen
aa005892ff doc(routing): document count
Count == 0 now means that we search for an unbounded number of providers.
2020-04-09 10:59:58 -07:00
Steven Allen
2159f6a2ed
Merge pull request #137 from libp2p/fix/insecure-transport
fix: don't drop bytes in the insecure transport
2020-04-02 20:54:13 -07:00
Steven Allen
9df5e4fcaf fix: don't drop bytes in the insecure transport
gogo's varint reader buffers internally. If you use it then throw it away,
you'll drop data. This commit reverts to using msgio, but uses the varint
reader/writers instead.
2020-04-02 20:44:44 -07:00
Steven Allen
33981f5696
Merge pull request #133 from libp2p/dependabot/go_modules/github.com/jbenet/goprocess-0.1.4
build(deps): bump github.com/jbenet/goprocess from 0.1.3 to 0.1.4
2020-03-29 23:56:32 -07:00
Vibhav Pant
6690d78eeb
peer: Add PeerRecordFromProtobuf. 2020-03-27 11:24:40 +05:30
Aarsh Shah
dbfc912c81
Merge pull request #136 from libp2p/feat/signed-record-addr-change-evt
Put signed peer record in the Address Change Event
2020-03-27 00:06:39 +05:30
Aarsh Shah
daf715e657
Update event/addrs.go
Co-Authored-By: Raúl Kripalani <raul@protocol.ai>
2020-03-27 00:05:03 +05:30
Aarsh Shah
fd1a4d28c6
Update event/addrs.go
Co-Authored-By: Raúl Kripalani <raul@protocol.ai>
2020-03-27 00:04:57 +05:30
Aarsh Shah
8173af76d1 put signed peer record in address change event 2020-03-26 17:27:09 +05:30
Vibhav Pant
075ac7484c
(*PeerRecord.MarshalRecord): Use ToProtobuf() to get protobuf struct 2020-03-25 17:42:49 +05:30
Vibhav Pant
4013be10ed
peer: Add (*PeerRecord).ToProtoBuf to get protobuf equivalent struct 2020-03-25 17:34:36 +05:30
dependabot-preview[bot]
4c983715a3
build(deps): bump github.com/jbenet/goprocess from 0.1.3 to 0.1.4
Bumps [github.com/jbenet/goprocess](https://github.com/jbenet/goprocess) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/jbenet/goprocess/releases)
- [Commits](https://github.com/jbenet/goprocess/compare/v0.1.3...v0.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-25 11:19:03 +00:00
Steven Allen
fdc64dde88
deps: move tools to a sub-module (#130)
That way, the root module doesn't depend on gocompat and all its dependencies.
2020-03-09 19:57:19 -07:00
Steven Allen
371a34d801
doc(event): document network events (#129)
Add extensive documentation to network events to explain the edge-cases.

Co-authored-by: Will <will@cypherpunk.email>
2020-03-06 17:18:54 -08:00