diff --git a/quic/connection.nim b/quic/connection.nim index 96dc94b..41c231b 100644 --- a/quic/connection.nim +++ b/quic/connection.nim @@ -1,4 +1,5 @@ import pkg/chronos +import ./stream import ./asyncloop import ./ngtcp2 import ./connectionid diff --git a/quic/ngtcp2.nim b/quic/ngtcp2.nim index b5dfb5e..18ea597 100644 --- a/quic/ngtcp2.nim +++ b/quic/ngtcp2.nim @@ -13,9 +13,6 @@ export receive, send export isHandshakeCompleted export handshake export ids -export Stream export openStream -export close -export read, write export incomingStream export destroy diff --git a/quic/ngtcp2/connection.nim b/quic/ngtcp2/connection.nim index f50663e..1a0045c 100644 --- a/quic/ngtcp2/connection.nim +++ b/quic/ngtcp2/connection.nim @@ -2,6 +2,7 @@ import std/sequtils import pkg/chronos import pkg/ngtcp2 import ../datagram +import ../stream import ../openarray import ../congestion import ../timeout @@ -23,10 +24,6 @@ type timeout*: Timeout onNewId*: proc(id: ConnectionId) onRemoveId*: proc(id: ConnectionId) - Stream* = ref object - id*: int64 - connection*: Ngtcp2Connection - incoming*: AsyncQueue[seq[byte]] proc destroy(connection: var Ngtcp2ConnectionObj) = if connection.conn != nil: @@ -60,14 +57,6 @@ proc ids*(connection: Ngtcp2Connection): seq[ConnectionId] = discard ngtcp2_conn_get_scid(connection.conn, scids.toPtr) scids.mapIt(ConnectionId(it.data[0..