Skip to content

Instantly share code, notes, and snippets.

@zerobell-lee
Created November 20, 2018 14:39
Show Gist options
  • Save zerobell-lee/7e31098c8455dc6a5daa4b4fa2a952da to your computer and use it in GitHub Desktop.
Save zerobell-lee/7e31098c8455dc6a5daa4b4fa2a952da to your computer and use it in GitHub Desktop.
from socket import *
clientSock = socket(AF_INET, SOCK_STREAM)
clientSock.connect(('127.0.0.1', 8080))
print('연결 확인 됐습니다.')
clientSock.send('I am a client'.encode('utf-8'))
print('메시지를 전송했습니다.')
data = clientSock.recv(1024)
print('받은 데이터 : ', data.decode('utf-8'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment