Skip to content

Instantly share code, notes, and snippets.

@yakutozcan
Last active November 13, 2016 22:22
Show Gist options
  • Save yakutozcan/27a0e2b697fd8f38d9b79bbfe81fd6e8 to your computer and use it in GitHub Desktop.
Save yakutozcan/27a0e2b697fd8f38d9b79bbfe81fd6e8 to your computer and use it in GitHub Desktop.
import socket
host = "192.168.1.25"
port = 1907
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
gidecek = input("Acmak icin H, Kapatmak icin L:")
ByteDataSend = bytes(gidecek, 'utf-8')
s.sendall(ByteDataSend)
data = s.recv(1024)
s.close()
b = data.decode('utf-8')
print('Gelen:' + b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment