-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathClient.py
More file actions
20 lines (18 loc) · 859 Bytes
/
Client.py
File metadata and controls
20 lines (18 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import socket
import time
import json
with socket.socket() as sock:
sock.connect(("169.254.119.30", 8080))
a = 0
while(True):
if a % 3 == 0:
content = {"text": "홈팀이 유리한 가운데, 윌슨 오늘 경기 2개의 포볼로 타자 출루 시켰습니다", "motion": "strike_1"}
elif a % 3 == 1:
content = {"text": "홈팀이 유리한 가운데, 윌슨 오늘 경기 2개의 포볼로 타자 출루 시켰습니다", "motion": "strike_0"}
elif a % 3 == 2:
content = {"text": "홈팀이 유리한 가운데, 윌슨 오늘 경기 2개의 포볼로 타자 출루 시켰습니다", "motion": "strike_-1"}
content = json.dumps(content, ensure_ascii=False)
print(content)
sock.sendall(content.encode('utf-8'))
time.sleep(5)
a = a + 1