Add the missing type for port

This commit is contained in:
mhchia 2019-07-24 21:28:14 +08:00
parent ecf4e373da
commit d64c7d6d56
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A

View File

@ -23,6 +23,7 @@ async def read_data(stream):
print("\x1b[32m %s\x1b[0m " % read_string, end="") print("\x1b[32m %s\x1b[0m " % read_string, end="")
# FIXME(mhchia): Reconsider whether we should use a thread pool here.
async def write_data(stream): async def write_data(stream):
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
while True: while True:
@ -85,6 +86,7 @@ def main():
"-p", "-p",
"--port", "--port",
default=8000, default=8000,
type=int,
help="source port number", help="source port number",
) )
parser.add_argument( parser.add_argument(