我看过一个视频:https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwj5rNmJ7tH-AhXRy7sIHVJHAXAQwqsBegQICxAF&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8xy4JKvqsV4&usg=AOvVaw0EP_uhwxA0J3lOjGRUpbMC做了他说的所有事情,但仍然有一个错误,问题是,我不能连接到我的笔记本电脑使用这个,他们在同一个网络上,虽然,它适用于我自己的屏幕与我共享,但不是关于我的笔记本电脑与我的PC或相反.
这是我的服务器。py**:
from vidstream import StreamingServer
import threading
from IPcatcher import GetIPv4
vIP = GetIPv4()
Port = 8080
receiver = StreamingServer(vIP, Port)
t = threading.Thread(target=receiver.start_server)
t.start()
还有我的委托人py**:
import threading
from vidstream import ScreenShareClient
from IPcatcher import GetIPv4
IP = GetIPv4()
Port = 8080
sender = ScreenShareClient(IP, Port)
sender.start_stream()
t = threading.Thread(target=sender.start_stream)
t.start()
print("Say STOP to stop spying: ", end='')
while input("") != "STOP":
continue
sender.stop_stream()
print("Spying stopped.")
我得到的整个错误:
Exception in thread Thread-6 (__client_streaming):
Traceback (most recent call last):
File "C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python311\Lib\site-packages\vidstream\streaming.py", line 269, in __client_streaming
self.__client_socket.connect((self.__host, self.__port))
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
请帮帮我,如果你能,我被困在这整整一个星期!我也睡不着!X(
thx in advance:)
1条答案
按热度按时间kb5ga3dv1#
好吧,我的整个问题是我自己的错误(几乎)。。我想。。因为我检查过了)* 与防火墙无关!这两个设备都在同一个网络上,我不小心运行了www. example www.example.com 和 www.example.com !!!但是我不知道为什么它的重点是运行客户端。pybeforethewww.example. www.example.com 吧..也许我会尝试自己修复这个XDDD我会看看我能做些什么来修复它。
感谢这个derpirscher老兄让我摆脱了这个困境:)上帝保佑你!