@@ -1,18 +1,14 | |||
|
1 | 1 | import socket |
|
2 | 2 | |
|
3 | #host = "localhost" | |
|
4 | 3 | host = "192.168.1.117" |
|
5 | #host = "192.168.1.100" | |
|
6 | s = socket.socket() | |
|
4 | s = socket.socket() | |
|
7 | 5 | s.connect((host, 5500)) |
|
8 | ||
|
9 | while True: | |
|
10 | mensaje = raw_input("> ") | |
|
11 | s.send(mensaje) | |
|
12 | if mensaje == "quit": | |
|
13 | break | |
|
14 | recibido = s.recv(1024) | |
|
15 | print "Recibido:", recibido | |
|
6 | ||
|
7 | fd = open("input.txt","r") | |
|
8 | FileList = fd.readlines() | |
|
9 | mensaje = "".join(FileList) | |
|
10 | s.send(mensaje) | |
|
11 | ||
|
16 | 12 | print "adios" |
|
17 | 13 | |
|
18 |
s.close() |
|
|
14 | s.close() No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now