mirror of https://github.com/vacp2p/nim-quic.git
Cleanup: remove unnecessary callbacks from server
This commit is contained in:
parent
9db83e629a
commit
c01fd25764
|
@ -54,21 +54,9 @@ proc receiveCryptoData(connection: ptr ngtcp2_conn, level: ngtcp2_crypto_level,
|
||||||
|
|
||||||
ngtcp2_conn_handshake_completed(connection)
|
ngtcp2_conn_handshake_completed(connection)
|
||||||
|
|
||||||
proc receiveStreamData(connection: ptr ngtcp2_conn, flags: uint32, stream_id: int64, offset: uint64, data: ptr uint8, datalen: uint, user_data: pointer, stream_user_data: pointer): cint {.cdecl.} =
|
|
||||||
discard
|
|
||||||
|
|
||||||
proc clientInitial(connection: ptr ngtcp2_conn, user_data: pointer): cint {.cdecl.} =
|
|
||||||
discard
|
|
||||||
|
|
||||||
proc random(dest: ptr uint8, destlen: uint, rand_ctx: ptr ngtcp2_rand_ctx, usage: ngtcp2_rand_usage): cint {.cdecl.} =
|
|
||||||
discard
|
|
||||||
|
|
||||||
proc updateKey(conn: ptr ngtcp2_conn, rx_secret: ptr uint8, tx_secret: ptr uint8, rx_aead_ctx: ptr ngtcp2_crypto_aead_ctx, rx_iv: ptr uint8, tx_aead_ctx: ptr ngtcp2_crypto_aead_ctx, tx_iv: ptr uint8, current_rx_secret: ptr uint8, current_tx_secret: ptr uint8, secretlen: uint, user_data: pointer): cint {.cdecl} =
|
proc updateKey(conn: ptr ngtcp2_conn, rx_secret: ptr uint8, tx_secret: ptr uint8, rx_aead_ctx: ptr ngtcp2_crypto_aead_ctx, rx_iv: ptr uint8, tx_aead_ctx: ptr ngtcp2_crypto_aead_ctx, tx_iv: ptr uint8, current_rx_secret: ptr uint8, current_tx_secret: ptr uint8, secretlen: uint, user_data: pointer): cint {.cdecl} =
|
||||||
discard
|
discard
|
||||||
|
|
||||||
proc handshakeConfirmed(conn: ptr ngtcp2_conn, userData: pointer): cint {.cdecl.} =
|
|
||||||
discard
|
|
||||||
|
|
||||||
proc handshakeCompleted(connection: ptr ngtcp2_conn, userData: pointer): cint {.cdecl.} =
|
proc handshakeCompleted(connection: ptr ngtcp2_conn, userData: pointer): cint {.cdecl.} =
|
||||||
var txKey: Key
|
var txKey: Key
|
||||||
assert 0 == ngtcp2_conn_install_tx_key(
|
assert 0 == ngtcp2_conn_install_tx_key(
|
||||||
|
@ -100,11 +88,7 @@ proc setupServer*(path: ptr ngtcp2_path, sourceId: ptr ngtcp2_cid, destinationId
|
||||||
callbacks.encrypt = dummyEncrypt
|
callbacks.encrypt = dummyEncrypt
|
||||||
callbacks.hp_mask = dummyHpMask
|
callbacks.hp_mask = dummyHpMask
|
||||||
callbacks.get_new_connection_id = getNewConnectionId
|
callbacks.get_new_connection_id = getNewConnectionId
|
||||||
callbacks.recv_stream_data = receiveStreamData
|
|
||||||
callbacks.client_initial = clientInitial
|
|
||||||
callbacks.rand = random
|
|
||||||
callbacks.update_key = updateKey
|
callbacks.update_key = updateKey
|
||||||
callbacks.handshake_confirmed = handshakeConfirmed
|
|
||||||
callbacks.handshake_completed = handshakeCompleted
|
callbacks.handshake_completed = handshakeCompleted
|
||||||
|
|
||||||
var settings = defaultSettings()
|
var settings = defaultSettings()
|
||||||
|
|
Loading…
Reference in New Issue