* error of yesterday fixed (stale "NOT"), and indicating which call fails

git-svn-id: trunk@13529 -
This commit is contained in:
marco 2009-08-13 14:06:30 +00:00
parent 6ea04bc9ac
commit 576d108e2e

View File

@ -18,7 +18,7 @@ begin
lsock:=fpsocket(af_inet,sock_stream,0); lsock:=fpsocket(af_inet,sock_stream,0);
if lsock=-1 then if lsock=-1 then
begin begin
writeln(socketerror); writeln('socket:',socketerror);
halt(1); halt(1);
end; end;
@ -31,13 +31,13 @@ begin
if fpbind(lsock,@saddr,sizeof(saddr))<>0 then if fpbind(lsock,@saddr,sizeof(saddr))<>0 then
begin begin
writeln(socketerror); writeln('bind:',socketerror);
halt(1); halt(1);
end; end;
if not fplisten(lsock,1)<>0 then if fplisten(lsock,1)<>0 then
begin begin
writeln(socketerror); writeln('listen:',socketerror);
halt(1); halt(1);
end; end;
@ -45,7 +45,7 @@ begin
usock:=fpaccept(lsock,@saddr,@len); usock:=fpaccept(lsock,@saddr,@len);
if usock=-1 then if usock=-1 then
begin begin
writeln(SocketError); writeln('accept:',SocketError);
halt(1); halt(1);
end; end;
sock2text(usock,sin,sout); sock2text(usock,sin,sout);
@ -78,7 +78,7 @@ begin
saddr.sin_addr.s_addr:=hosttonet($7f000001); {127.0.0.1} saddr.sin_addr.s_addr:=hosttonet($7f000001); {127.0.0.1}
if not connect(s,saddr,sin,sout) then if not connect(s,saddr,sin,sout) then
begin begin
writeln(socketerror); writeln('connect:',socketerror);
halt(1); halt(1);
end; end;
writeln(sout,'abcd'); writeln(sout,'abcd');