|
|
def is_http(header_bytes: bytes) -> bool:
|
|
"""
|
|
Returns True if the header is an HTTP request.
|
|
"""
|
|
|
|
def is_ssh(header_bytes: bytes) -> bool:
|
|
"""
|
|
Returns True if the header is an SSH request.
|
|
"""
|
|
|
|
def write(fd: int, header_bytes: bytes) -> int:
|
|
"""
|
|
Sends data chunked to the client.
|
|
"""
|
|
|
|
def read(fd: int, length: int) -> bytes:
|
|
"""
|
|
Read n bytes from the client. Will not block.
|
|
""" |