* [9fans] UDP echo server sample code
@ 2011-01-31 9:45 ish
2011-01-31 10:15 ` Lucio De Re
2011-01-31 17:45 ` ish
0 siblings, 2 replies; 4+ messages in thread
From: ish @ 2011-01-31 9:45 UTC (permalink / raw)
To: 9fans
Can any one enlighten me on how announce() etc. can be used design an
echo server with UDP,
or point to samle code?
...
char adir[40];
int afd ;
afd = announce("udp!*!1234", adir);
and??
...
-ishwar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] UDP echo server sample code
2011-01-31 9:45 [9fans] UDP echo server sample code ish
@ 2011-01-31 10:15 ` Lucio De Re
2011-01-31 17:23 ` Anthony Martin
2011-01-31 17:45 ` ish
1 sibling, 1 reply; 4+ messages in thread
From: Lucio De Re @ 2011-01-31 10:15 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Mon, Jan 31, 2011 at 09:45:44AM +0000, ish wrote:
>
> afd = announce("udp!*!1234", adir);
>
> and??
> ...
while (read (afd, ...) > 0) {
write (afd, ...);
}
... sort of thing?
++L
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] UDP echo server sample code
2011-01-31 10:15 ` Lucio De Re
@ 2011-01-31 17:23 ` Anthony Martin
0 siblings, 0 replies; 4+ messages in thread
From: Anthony Martin @ 2011-01-31 17:23 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Lucio De Re <lucio@proxima.alt.za> once said:
> On Mon, Jan 31, 2011 at 09:45:44AM +0000, ish wrote:
> >
> > afd = announce("udp!*!1234", adir);
> >
> > and??
> > ...
> while (read (afd, ...) > 0) {
> write (afd, ...);
> }
>
> ... sort of thing?
This works if you write "headers" to the control
file after the announce. Otherwise, you still need
to do the listen and accept. See ip(3) for more.
Anthony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] UDP echo server sample code
2011-01-31 9:45 [9fans] UDP echo server sample code ish
2011-01-31 10:15 ` Lucio De Re
@ 2011-01-31 17:45 ` ish
1 sibling, 0 replies; 4+ messages in thread
From: ish @ 2011-01-31 17:45 UTC (permalink / raw)
To: 9fans
On Jan 31, 12:28 pm, al...@pbrane.org (Anthony Martin) wrote:
> Lucio De Re <lu...@proxima.alt.za> once said:
>
> > On Mon, Jan 31, 2011 at 09:45:44AM +0000, ish wrote:
>
> > > afd = announce("udp!*!1234", adir);
>
> > > and??
> > > ...
> > while (read (afd, ...) > 0) {
> > write (afd, ...);
> > }
>
> > ... sort of thing?
>
> This works if you write "headers" to the control
> file after the announce.
Is adir/ctl the control file?
-ishwar
Otherwise, you still need
> to do the listen and accept. See ip(3) for more.
>
> Anthony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-31 17:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-31 9:45 [9fans] UDP echo server sample code ish
2011-01-31 10:15 ` Lucio De Re
2011-01-31 17:23 ` Anthony Martin
2011-01-31 17:45 ` ish
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).