##// END OF EJS Templates
imanay -
r59:60
parent child
Show More
@@ -4,7 +4,7
4 4
5 5 class ABSServer:
6 6
7 def __init__(self,ipSource="localhost", ipDestino="192.168.1.255", portDestino=7000, ipDestino2="192.168.1.255", portDestino2=5500, ftpPortDestino=None):
7 def __init__(self,ipSource="localhost", ipDestino="192.168.1.117", portDestino=7000, ipDestino2="192.168.1.255", portDestino2=5500, ftpPortDestino=None):
8 8
9 9 self.ipSource = ipSource
10 10 self.ipDestino = ipDestino
@@ -35,6 +35,7
35 35
36 36 if cmd == "SNDF":
37 37 self.sendFile2Modules()
38 pass
38 39
39 40 if cmd == "CHGB":
40 41 self.changeBeam()
@@ -1,4 +1,5
1 import socket
1 import socket
2 import time
2 3
3 4 host = "192.168.1.117"
4 5 s = socket.socket()
@@ -9,6 +10,7
9 10
10 11 while True:
11 12 recibido = sc.recv(1024)
13 time.sleep(70)
12 14 if recibido == "quit":
13 15 break
14 16 print "Recibido:", recibido
@@ -1,9 +1,14
1 1 import socket
2 import time
2 3
3 4 dgramSock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
4 dgramSock.bind( ('', 23000) )
5 dgramSock.bind( ('192.168.1.117', 7000) )
5 6
6 7 while 1:
7 8
8 9 msg, (addr, port) = dgramSock.recvfrom( 100 )
10
11 # time.sleep(30) #not ok at the client
12 # time.sleep(10) #ok
13 print msg + 'to: ' + addr + ':' + str (port)
9 14 dgramSock.sendto( msg, (addr, port) )
General Comments 0
You need to be logged in to leave comments. Login now