aboutsummaryrefslogtreecommitdiff
path: root/cmd/dendrite-demo-yggdrasil/yggconn/stream.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-07-02 17:43:07 +0100
committerGitHub <noreply@github.com>2020-07-02 17:43:07 +0100
commit38caf8e5b7623c090f8949076b57d769e42011ad (patch)
tree49d5434f09945bb7ea9313b153808f1a1abc6204 /cmd/dendrite-demo-yggdrasil/yggconn/stream.go
parent9c1f38621c4d787761092bc841e06ca424fbbf35 (diff)
Yggdrasil+QUIC demo, federation sender tweaks (#1177)
* Initial QUIC work * Update Yggdrasil demo * Make sure that the federation sender knows how many pending events are in the database when the worker starts * QUIC tunables * pprof * Don't spin * Set build info for Yggdrasil
Diffstat (limited to 'cmd/dendrite-demo-yggdrasil/yggconn/stream.go')
-rw-r--r--cmd/dendrite-demo-yggdrasil/yggconn/stream.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/stream.go b/cmd/dendrite-demo-yggdrasil/yggconn/stream.go
new file mode 100644
index 00000000..dac7447e
--- /dev/null
+++ b/cmd/dendrite-demo-yggdrasil/yggconn/stream.go
@@ -0,0 +1,20 @@
+package yggconn
+
+import (
+ "net"
+
+ "github.com/lucas-clemente/quic-go"
+)
+
+type QUICStream struct {
+ quic.Stream
+ session quic.Session
+}
+
+func (s QUICStream) LocalAddr() net.Addr {
+ return s.session.LocalAddr()
+}
+
+func (s QUICStream) RemoteAddr() net.Addr {
+ return s.session.RemoteAddr()
+}