Skip to content
Snippets Groups Projects
Commit 93038531 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Fix Error thread

parent 668627b2
No related branches found
No related tags found
No related merge requests found
......@@ -31,9 +31,9 @@ import threading
import sys
import binascii
MACHINE_ID = 1
SEND_PORT = 5000 # Porta que o Servidor envia
RECV_PORT = 5000 # Porta que o Servidor recebe
MACHINE_ID = 1
class Protocol():
def __init__ (self):
......@@ -98,6 +98,7 @@ class Protocol():
return "%08X" % buff
def client ():
try:
udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
dest = (HOST, SEND_PORT)
print 'Para sair digite exit\n'
......@@ -119,6 +120,9 @@ def client ():
msg = protocolMessage.getEmpacotar()
threadServer._Thread__stop()
udp.close()
except:
print 'OPS, ALGO OCORREU ERRADO'
threadServer._Thread__stop()
def server ():
udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment