Spaces Data
Minimal test - lines (93, 112)
path: .spaces[3].metrics.loc.blank
old: 4.0
new: 5.0
path: .spaces[3].metrics.loc.sloc
old: 17.0
new: 20.0
path: .spaces[3].metrics.loc.cloc
old: 5.0
new: 7.0
path: .spaces[3].metrics.mi.mi_visual_studio
old: 57.08681108600362
new: 55.547158069708914
path: .spaces[3].metrics.mi.mi_original
old: 97.6184469570662
new: 94.98564029920225
path: .spaces[3].metrics.mi.mi_sei
old: 102.47238103471868
new: 101.11055979657289
Code
def main():
# Step 1: Set up your TLS context.
context = get_http2_ssl_context()
# Step 2: Receive a TCP connection.
connection = establish_tcp_connection()
# Step 3: Wrap the connection in TLS and validate that we negotiated HTTP/2
tls_connection = negotiate_tls(connection, context)
# Step 4: Create a server-side H2 connection.
config = h2.config.H2Configuration(client_side=False)
http2_connection = h2.connection.H2Connection(config=config)
# Step 5: Initiate the connection
http2_connection.initiate_connection()
tls_connection.sendall(http2_connection.data_to_send())
# The TCP, TLS, and HTTP/2 handshakes are now complete. You can enter your
# main loop now.