I have mentioned the port number in the TelnetServer proc. It works well when I mention port number.
When I dont mention the port number like below, I see the traceback.
What I have tried:
I have mentioned the port number in the TelnetServer proc. It works well when I mention port number.
When I dont mention the port number like below, I see the traceback.
if __name__ == '__main__':
# Simple chat server to demonstrate connection handling via the
# async and telnet modules.
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('telnet_server')
# Create a telnet server with a port, address,
# a function to call with new connections
# and one to call with lost connections.
telnet_server = TelnetServer(
port='', ##### is there any way not to mention the port number here?
address='',
on_connect=on_connect,
on_disconnect=on_disconnect,
timeout = .05
)
Traceback (most recent call last):
File "/bootflash/telnet_server_1.py", line 173, in <module>
timeout = .05
File "/usr/lib/python2.7/site-packages/miniboa/async.py", line 80, in __init__
server_socket.bind((address, port))
File "/usr/lib64/python2.7/socket.py", line 224, in meth
TypeError: an integer is required