import socket

def run():
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(("localhost", 8081))  # 连接服务器
    sock.sendall(bytes("hello from client","utf-8"))  # 将消息输出到发送缓冲 send buffer
    print(sock.recv(1024))  # 从接收缓冲 recv buffer 中读响应
    sock.close()  # 关闭套接字...

if __name__=="__main__":
    run()
eccd1337ae3e56c58cbbe7b74bd1d0753736f398
<mask token>

<mask token>


def run():
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(('localhost', 8081))
    sock.sendall(bytes('hello from client', 'utf-8'))
    print(sock.recv(1024))
    sock.close()


<mask token>

<mask token>


def run():
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(('localhost', 8081))
    sock.sendall(bytes('hello from client', 'utf-8'))
    print(sock.recv(1024))
    sock.close()


if __name__ == '__main__':
    run()

import socket


def run():
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(('localhost', 8081))
    sock.sendall(bytes('hello from client', 'utf-8'))
    print(sock.recv(1024))
    sock.close()


if __name__ == '__main__':
    run()

import socket

def run():
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(("localhost", 8081))  # 连接服务器
    sock.sendall(bytes("hello from client","utf-8"))  # 将消息输出到发送缓冲 send buffer
    print(sock.recv(1024))  # 从接收缓冲 recv buffer 中读响应
    sock.close()  # 关闭套接字...

if __name__=="__main__":
    run()