Good day.

Can you resolve the hostname "tigaon" on the same machine? For an echo
server; look at dial(2), which shows one in the EXAMPLES section.

Sincerely,

Christoph

On Tue, 17 May 2005 10:19:59 -0400 (EDT)
I RATTAN <[EMAIL PROTECTED]> wrote:

> 
> 
> On Tue, 17 May 2005, Russ Cox wrote:
> 
> > What does your program look like?
> 
> Here is the client code..
> -ishwar
> -----
> #include <u.h>
> #include <libc.h>
> 
> void
> main(void)
> {
>    char ibuf[128], obuf[33]="98765432109876543210987654321098";
> 
>    int fd, i, len;
> 
> 
>    if((fd = dial("tcp!tigaon!7", 0, 0, 0)) < 0)
>         sysfatal("dial");
>    for (i = 0; i < 21; i++) {
>         obuf[33-i] = 0;
>         len = strlen(obuf) + 1;
>         if(write(fd, obuf, len) != len)
>                 sysfatal("write");
>         if(read(fd, ibuf, 128) > 0)
>                 print("Got from server: %s\n", ibuf);
>     }
>     close(fd);
>     exits(nil);
> }
> ---

Reply via email to