16 ' "request_type":"DATA",' 17 ' "command":"CONNECT",' 19 f
' "peer_id": "{peer_id}", ' 20 f
' "token": "{token}", ' 21 f
' "target_id": "{target_id}", ' 22 f
' "plugin_info": {json.dumps(plugin_info)}, ' 24 ' "serialization": "NONE", ' 27 ' "maxRetransmits": 0 ' 31 f
' "data_id": "{data_id}" ' 33 ' "redirect_params": { ' 34 f
' "ip_v4": "{redirect_ip}", ' 35 f
' "port": {redirect_port}' 41 message[
"params"][
"options"][
"metadata"] = json.dumps(metadata)
42 return json.dumps(message)
48 ' "request_type":"DATA",' 49 ' "command":"REDIRECT",' 51 f
' "data_connection_id":"{data_connection_id}",' 52 f
' "plugin_info":{json.dumps(plugin_info)}' 61 ' "request_type":"DATA",' 62 ' "command":"STATUS",' 64 f
' "data_connection_id":"{data_connection_id}"' def create_connect_request(peer_id, token, target_id, plugin_info, metadata, data_id, redirect_ip, redirect_port)
def redirect_request(data_connection_id, plugin_info)
def create_data_status_request(data_connection_id)