質問編集履歴

2

文法のミス

2023/02/14 12:11

投稿

AGLAAGLA
AGLAAGLA

スコア54

test CHANGED
File without changes
test CHANGED
@@ -28,7 +28,7 @@
28
28
  # python3 send.py
29
29
  Traceback (most recent call last):
30
30
  File "/home/usr/send.py", line 7, in <module>
31
- s.connect(('localhost', PORT))
31
+ s.connect(('0.0.0.0', PORT))
32
32
  ConnectionRefusedError: [Errno 111] Connection refused
33
33
  ```
34
34
 

1

書式の改善

2023/02/14 12:09

投稿

AGLAAGLA
AGLAAGLA

スコア54

test CHANGED
File without changes
test CHANGED
@@ -62,7 +62,7 @@
62
62
  BUFFER_SIZE = 1024
63
63
 
64
64
  with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
65
- s.connect(('localhost', PORT))
65
+ s.connect(('0.0.0.0', PORT))
66
66
  # data = input('Please input > ')
67
67
  data = "sony"
68
68
  s.send(data.encode())