server:
from vidstream import StreamingServer # pip install vidstream
import socket # pip install socket
import os
server_ip = '192.168.0.105'
server_port = 6969
while True:
os.system('cls')
server_input = input(f'server : {server_ip}:{server_port}\n\n[1] change port & ip\n[2] start server\n\n> ')
if server_input == '2':
server = StreamingServer(server_ip, server_port)
server.start_server()
input(f'\nlistening on {server_ip} port {server_port}\n\npress enter to stop server ...')
server.stop_server()
elif server_input == '1':
server_ip = socket.gethostbyname(socket.gethostname())
server_port = int(input('port : '))
client:
from vidstream import ScreenShareClient
from vidstream import CameraClient
try:
client1 = CameraClient('192.168.0.105', 6969)
client1.start_stream()
except:
pass
client = ScreenShareClient('192.168.0.105', 6969)
client.start_stream()
ошибка:
Exception in thread Thread-1 (__client_streaming):
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Atri277\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\vidstream\streaming.py", line 269, in __client_streaming
self.__client_socket.connect((self.__host, self.__port))
ConnectionRefusedError: [WinError 10061] Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение
используются два разных пк, в клиенте выдаёт ошибку, как исправить?