kan
var
isa:SOCKADDR_IN;
isa_len:integer;//接受客户端的套接字。
acceptsocket:Tsocket //主机
targethost:pchar//端口
begin
client:=socket(pf_inet,sock_stream,ipproto_ip);
if client+invalid_socket then
//showerror
end;
ca.sin_family:=pf_inet;//ip zu
ca.sin_port=htons(targetprot);//转换网络字节
hostadd:=inet_addr(targethost);
if (hostaddr=-1) then
//showerror
end;
太多了。。。。。看能不能帮你