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