Created
July 10, 2021 21:36
-
-
Save mvgolom/d7d1ea585b29dddcf48ec64edfcc0a5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
HOST = '127.0.0.1' # Endereco IP do Servidor | |
PORT = 5000 # Porta que o Servidor esta | |
tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
dest = (HOST, PORT) | |
tcp.connect(dest) | |
print 'Para sair use CTRL+X\n' | |
msg = raw_input() | |
while msg <> '\x18': | |
tcp.send (msg) | |
msg = raw_input() | |
tcp.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment