Skip to content

Commit

Permalink
identation correct
Browse files Browse the repository at this point in the history
  • Loading branch information
alberth7 committed Oct 7, 2019
1 parent 73dbdf7 commit d2974f6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sockets_UDP/UDPServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class UDP_Server:
paqueteRecibido = ""
paqueteAEnviar = ""
paqueteAEnviar = ""

def __init__(self, ip, puerto):
self.ipServer = ip
Expand All @@ -19,20 +19,17 @@ def inicio(self):
while True:

mensaje, direccionIP = serverSocketUDP.recvfrom(1024)
paqueteRecibido = mensaje;
paqueteRecibido = mensaje
print(f"cliente conectado desde la IP : {direccionIP} ")
paqueteAEnviar = "conectado al servidor"
serverSocketUDP.sendto(paqueteAEnviar.encode(), direccionIP)

def fin():
clientsocket.close()
serverSocketUDP.close()


class MainUDP_Server:
s = UDP_Server("127.0.0.1", 5012)
s.inicio()
s.fin()




Expand Down

0 comments on commit d2974f6

Please sign in to comment.