mirror of
https://github.com/r4sas/Niflheim-api
synced 2025-09-06 11:12:05 +00:00
changed to TCP with fixes
This commit is contained in:
parent
36648fcc50
commit
a212fed4d9
@ -11,8 +11,11 @@ def send_view_to_server(tosend):
|
|||||||
attempts = 3
|
attempts = 3
|
||||||
while attempts:
|
while attempts:
|
||||||
try:
|
try:
|
||||||
conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
conn = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
|
||||||
conn.sendto(tosend, (SERVER, 45671))
|
conn.connect((SERVER, 45671))
|
||||||
|
conn.send(tosend)
|
||||||
|
conn.close()
|
||||||
|
print "sent ok"
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
attempts -= 1
|
attempts -= 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user