--- unix-client.pas	2004-04-26 23:34:24.000000000 +0200
+++ ip-client.pas	2004-05-03 22:42:52.000000000 +0200
@@ -1,21 +1,32 @@
 program Unix_Client;
 
-uses sockets;
+uses sockets,inet;
 
 const
-   fileName = '/tmp/ukazkovySocket';
+   port = 4456;               { port serveru }
 
 var
    s	    : longint;        { socket }
    sin,sout : text;           { pascalske proudy }
    line	    : string;
+   addr	    : TInetSockAddr;      { struktura pro connect }
+   host	    : THost;          { objekt hostitele (coz zni hrozne ucene ^_~) }
 
 begin
-   s:=socket(AF_UNIX,SOCK_STREAM,PF_UNIX);
+   if paramcount<>1 then begin
+      writeln('Usage: ',paramstr(0),' <address>');
+      halt(4)
+   end;
+   s:=socket(AF_INET,SOCK_STREAM,0);
    if s=-1 then begin
       halt(1);
    end;
-   if not connect(s,fileName,sin,sout) then halt(2);
+   host.NameLookup(paramstr(1));
+   addr.family:=AF_INET;               { Rodina adres, tj AF_INET }
+   addr.port:=ShortHostToNet(port);   
+   addr.addr:=HostToNet(LongInt(host.IPAddress)); { IP adresa serveru }
+   host.done;
+   if not connect(s,addr,sin,sout) then halt(2);
    reset(sin);
    rewrite(sout);
    repeat
