Complete the code to identify the protocol used for communication.
if message.protocol == '[1]': process_http(message)
The code checks if the message protocol is HTTP to process it accordingly.
Complete the code to select the right protocol for secure data transfer.
if use_encryption: protocol = '[1]' else: protocol = 'HTTP'
HTTPS is the secure version of HTTP, used for encrypted data transfer.
Fix the error in the protocol check to avoid runtime failure.
if message.protocol == [1]: process_message(message)
The protocol name must be a string literal, so it needs quotes.
Fill both blanks to correctly define a protocol handler function.
def handle_[1](message): if message.protocol == '[2]': process_[1](message)
The function name uses lowercase 'http' while the protocol string is uppercase 'HTTP'.
Fill all three blanks to create a dictionary mapping protocols to ports.
protocol_ports = {
'[1]': [2],
'[3]': 443
}HTTP uses port 80 and HTTPS uses port 443 for secure communication.
