@ -1,6 +1,26 @@
#!/bin/env python3
#!/bin/env python3
def check_bridge_socket ( ) : :
import socket ;
import sys ;
def init_socket ( ) :
# Creates a TCP/IP socket
# socket type .AF_INET is the Internet address family for IPv4.
# .SOCK_STREAM is the socket type for TCP.
debug_socket = socket . socket ( socket . AF_INET , socket . SOCK_STREAM )
# Bind the socket to the port 8000
debug_server_address = ( ' localhost ' , 8000 )
debug_socket . bind ( debug_server_address )
# Listen for incoming connections
debug_socket . listen ( 1 )
while True :
# Wait for a connection
print >> sys . stderr , ' Waiting for a Connection '
connection , client_address = debug_socket . accept ( )
def check_bridge_socket ( ) :
evt = None
evt = None
return evt
return evt
@ -9,7 +29,6 @@ def handle_bridge_evt(evt):
TODO : Whatever bridge events to handle
TODO : Whatever bridge events to handle
"""
"""
def check_debug_socket ( ) :
def check_debug_socket ( ) :
dbg_evt = None
dbg_evt = None
return dbg_evt
return dbg_evt
@ -28,6 +47,7 @@ def run_loop():
if dbg_evt != None :
if dbg_evt != None :
handle_debug_evt ( dbg_evt )
handle_debug_evt ( dbg_evt )
def main ( ) :
def main ( ) :
init_socket ( )
"""
"""
1. TODO : Open Server port that the device connects to .
1. TODO : Open Server port that the device connects to .
2. TODO : Open Server port that an admin connects to , i . e . , to test sending packets to
2. TODO : Open Server port that an admin connects to , i . e . , to test sending packets to