##// END OF EJS Templates
imanay -
r59:60
parent child
Show More
@@ -4,7 +4,7
4 4 No newline at end of file
5 5 class ABSServer: No newline at end of file
6 6
7 No newline at end of file
7 def __init__(self,ipSource="localhost", ipDestino="192.168.1.255", portDestino=7000, ipDestino2="192.168.1.255", portDestino2=5500, ftpPortDestino=None): No newline at end of file
8 8 No newline at end of file
9 9 self.ipSource = ipSource No newline at end of file
10 10 self.ipDestino = ipDestino No newline at end of file
@@ -1,4 +1,5
1 1 import socket No newline at end of file
2 import time No newline at end of file
2 3 No newline at end of file
3 4 host = "192.168.1.117" No newline at end of file
4 5 s = socket.socket() No newline at end of file
@@ -1,9 +1,14
1 1 import socket No newline at end of file
2 import time No newline at end of file
2 3 No newline at end of file
3 4 dgramSock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
5 No newline at end of file
4 dgramSock.bind( ('', 23000) ) No newline at end of file
5 6 No newline at end of file
6 7 while 1: No newline at end of file
7 8 No newline at end of file
8 9 msg, (addr, port) = dgramSock.recvfrom( 100 ) No newline at end of file
10
No newline at end of file
11 # time.sleep(30) #not ok at the client
No newline at end of file
12 # time.sleep(10) #ok
No newline at end of file
13 print msg + 'to: ' + addr + ':' + str (port) No newline at end of file
9 14 dgramSock.sendto( msg, (addr, port) ) No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now