728x90 반응형 SMALL python socket client1 Python - Socket(Client) with struct (쉽게 테스트용 Client 만들기) 언제나 그렇듯 python 은 예제 소스코드로 보는 것이 이해하기 쉽다. import socket import struct s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) addr = ('192.168.101.118', 2123) s.connect(addr) # header magicCode = 1234 pType = 12 pVer = 1 # body userIp = bytes('192.168.3.101', encoding='UTF-8') url = bytes('https://abc.com/def.jsp?param1=test¶m2=ABC', encoding='UTF-8') urlLen = len('https://abc.com/def.jsp?param1=tes.. 2018. 9. 11. 이전 1 다음 728x90 반응형 LIST