E
earlyspring
Unregistered / Unconfirmed
GUEST, unregistred user!
var
clisock:tsocket;
saproxy:TSockAddr;
re:integer;
begin
clisock:=socket(AF_INET,SOCK_stream,0);
if(clisock=INVALID_SOCKET) then
begin
application.MessageBox('创建SOCKET出现错误,程序即将关闭','严重错误',mb_ok+mb_iconwarning);
application.Terminate;
end;
ZeroMemory(@saproxy,sizeof(saproxy));
saproxy.sin_family := AF_INET;
saproxy.sin_addr.S_addr :=inet_addr('192.168.0.1');
saproxy.sin_port := htons(9600);
Re:=connect(clisock,saproxy,sizeof(saproxy));
if Re=SOCKET_ERROR then
begin
application.MessageBox('连接代理服务器出现错误,程序即将关闭','严重错误',mb_ok+mb_iconwarning);
application.Terminate;
end;
end;
clisock:tsocket;
saproxy:TSockAddr;
re:integer;
begin
clisock:=socket(AF_INET,SOCK_stream,0);
if(clisock=INVALID_SOCKET) then
begin
application.MessageBox('创建SOCKET出现错误,程序即将关闭','严重错误',mb_ok+mb_iconwarning);
application.Terminate;
end;
ZeroMemory(@saproxy,sizeof(saproxy));
saproxy.sin_family := AF_INET;
saproxy.sin_addr.S_addr :=inet_addr('192.168.0.1');
saproxy.sin_port := htons(9600);
Re:=connect(clisock,saproxy,sizeof(saproxy));
if Re=SOCKET_ERROR then
begin
application.MessageBox('连接代理服务器出现错误,程序即将关闭','严重错误',mb_ok+mb_iconwarning);
application.Terminate;
end;
end;