套接字 (Socket)。
$ x86_64-w64-mingw32-g++.exe gdbserver.cpp -lws2_32 -static-libstdc++ -static-libgcc -o gdbserver.exe
#!/usr/bin/env python """ A simple echo server """ import socket host = '' port = 50000 backlog = 5 size = 1024 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host,port)) s.listen(backlog) while 1: client, address = s.accept() data = client.recv(size) if data: client.send(data) client.close()