how to read tcp packets from the gateway python script code example Example: client server python socket s = socket.socket (socket_family, socket_type, protocol=0)