0

我想使用套接字创建流式视频。我需要知道如何找到端口号地址。

我为创建客户端而编写的代码:

# create socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host_ip = '192.168.0.165'  # paste your server ip address here
port = 
client_socket.connect((host_ip, port))  # a tuple
data = b""
payload_size = struct.calcsize("Q") # Q: unsigned long long integer(8 bytes)
4

1 回答 1

0

Can you post the code from your service app? (or name the service app) Usually you declare the port in the service somewhere. If its prebuilt, it could be in a configuration file.

You can run cmd.exe and type netstat to check your port activity. Or go to your firewalls inbound/outbound rules. Typically if its a prebuilt app it will create a firewall rule with associated port so the firewall does not freak out when connections come in to that port.

But otherwise there is not enough information here for me to give a complete answer.

于 2021-11-28T22:24:20.650 回答