You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
355 B
12 lines
355 B
import socket
|
|
import time
|
|
|
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
|
s.connect(('116.203.215.166', 1337))
|
|
s.sendall('I am closing the write end, but I can still receive data'.encode())
|
|
s.shutdown(socket.SHUT_WR)
|
|
while True:
|
|
data = s.recv(1024)
|
|
if not data:
|
|
break
|
|
print(data.decode())
|
|
|