Spaces Data
Minimal test - lines (92, 110)
path: .spaces[3].metrics.loc.sloc
old: 16.0
new: 19.0
path: .spaces[3].metrics.loc.blank
old: 4.0
new: 5.0
path: .spaces[3].metrics.loc.cloc
old: 5.0
new: 7.0
path: .spaces[3].metrics.mi.mi_sei
old: 107.9798987742873
new: 106.26295184894413
path: .spaces[3].metrics.mi.mi_original
old: 100.84662919921884
new: 98.06265503700696
path: .spaces[3].metrics.mi.mi_visual_studio
old: 58.97463695860751
new: 57.346581892986535
Code
def main():
# Step 1: Set up your TLS context.
context = get_http2_ssl_context()
# Step 2: Create 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 client-side H2 connection.
http2_connection = h2.connection.H2Connection()
# 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.