Skip to content

Instantly share code, notes, and snippets.

@zerobell-lee
Created November 21, 2018 12:29
Show Gist options
  • Save zerobell-lee/283323466813467f4f66a3dd9b4de8ef to your computer and use it in GitHub Desktop.
Save zerobell-lee/283323466813467f4f66a3dd9b4de8ef to your computer and use it in GitHub Desktop.
from socket import *
port = 8080
clientSock = socket(AF_INET, SOCK_STREAM)
clientSock.connect(('127.0.0.1', port))
print('접속 완료')
while True:
recvData = clientSock.recv(1024)
print('상대방 :', recvData.decode('utf-8'))
sendData = input('>>>')
clientSock.send(sendData.encode('utf-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment