mirror of https://github.com/vacp2p/nim-quic.git
Cleanup: introduce Connection.isHandshakeCompleted
This commit is contained in:
parent
2ed74d0709
commit
9ca3fa3e8d
|
@ -0,0 +1,5 @@
|
|||
import ngtcp2
|
||||
import connection
|
||||
|
||||
proc isHandshakeCompleted*(connection: Connection): bool =
|
||||
ngtcp2_conn_get_handshake_completed(connection.conn).bool
|
|
@ -4,8 +4,8 @@ import helpers/server
|
|||
import helpers/client
|
||||
import helpers/ids
|
||||
import helpers/path
|
||||
import helpers/connection
|
||||
import helpers/udp
|
||||
import helpers/handshake
|
||||
|
||||
suite "ngtcp2":
|
||||
|
||||
|
@ -43,9 +43,9 @@ suite "ngtcp2":
|
|||
echo "--- CLIENT 3>>> SERVER"
|
||||
datagramLength = client.write(datagram, datagramInfo)
|
||||
|
||||
check client.conn.ngtcp2_conn_get_handshake_completed().bool
|
||||
check client.isHandshakeCompleted
|
||||
|
||||
echo "--- CLIENT >>>3 SERVER"
|
||||
server.read(datagram[0..<datagramLength], datagramInfo)
|
||||
|
||||
check server.conn.ngtcp2_conn_get_handshake_completed().bool
|
||||
check server.isHandshakeCompleted
|
||||
|
|
Loading…
Reference in New Issue