9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Running a server/service??
@ 2000-11-11 17:55 anothy
  2000-11-12  0:52 ` Boyd Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: anothy @ 2000-11-11 17:55 UTC (permalink / raw)
  To: 9fans

i suggest you check out listen(8); in particular, the -d and -t
options should help you out. you can create a directory of your
own and just specify that in the -d or -t arguements.

assuming i've created /usr/foo/bin/rc/my.services and myecho is
an executable file (script or binary) that does what you want, i
think the steps you're looking for are these:
1)	create /bin/my.services/tcp1111 - this should be either an
	executable shell script like tcp7, substituting myecho for
	cat, or you could just 'cp myecho tcp7'.
2)	start listen - 'aux/listen -d /bin/my.services'

that's it, if i understand your question correctly. i'd point
out that each of these servers are, technically, a "user-level
server process". if, for some reason, you really don't want to
use listen, you don't have to. i'd urge you to reconsider, but
look at /bin/ip/*d for examples.
-α.


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [9fans] Running a server/service??
@ 2000-11-12 17:44 anothy
  2000-11-12 17:56 ` Boyd Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: anothy @ 2000-11-12 17:44 UTC (permalink / raw)
  To: 9fans

//just up the point size, ok?

alright, now i'm really confused. uh, what? i'm
not sending any font information, including any
point size. unless i'm really missing something,
the font size has got to be changed on your end.
-α.


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [9fans] Running a server/service??
@ 2000-11-12 17:39 anothy
  2000-11-12 17:44 ` Boyd Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: anothy @ 2000-11-12 17:39 UTC (permalink / raw)
  To: 9fans

//unicode's broken.  but 16 bit chars are a good idea.  they went too far.
okay, i'll bite: explain, please.

//yeah i see the 'alpha'.

than what's the problem?
-α.


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [9fans] Running a server/service??
@ 2000-11-12 17:14 anothy
  2000-11-12 17:35 ` Boyd Roberts
  2000-11-12 17:36 ` Boyd Roberts
  0 siblings, 2 replies; 13+ messages in thread
From: anothy @ 2000-11-12 17:14 UTC (permalink / raw)
  To: 9fans

unicode's fun. try it. you'll like it.

if nothing else, i find watching who complains, or
just asks questions, an interesting experiment in
what different clients can handle, and what people
are using. much to my suprise, i'm told MS Outlook
gets this one right.

i might point out Acme mail and *edmail do, too.
-α. (or -a. for the unicode impaired)


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [9fans] Running a server/service??
@ 2000-11-12  0:54 Russ Cox
  2000-11-12  1:04 ` Boyd Roberts
  0 siblings, 1 reply; 13+ messages in thread
From: Russ Cox @ 2000-11-12  0:54 UTC (permalink / raw)
  To: 9fans

what hideous font?  surely you're not 
objecting to the use of UTF-8 on the
plan 9 mailing list.



^ permalink raw reply	[flat|nested] 13+ messages in thread
* [9fans] Running a server/service??
@ 2000-11-11 17:20 ed
  0 siblings, 0 replies; 13+ messages in thread
From: ed @ 2000-11-11 17:20 UTC (permalink / raw)
  To: 9fans

washoe is a stand-alone terminal running 2nd edition:

washoe % netstat
tcp  0    ed          Established 600        login      pyramid.cs.unr.edu
udp  0    ed          Dgram       0          0          0.0.0.0
il   0    ed          Established 5001       exportfs   manzanita.cs.unr.edu
il   1    ed          Closed      0          0          0.0.0.0

washoe % ipecho
Usage: ipecho [t|i|u] host 	#t=tcp, i=il, u=udp
host can be IP address or domain name
washoe % ipecho i washoe
il!washoe!echo did not return echo
washoe % ipecho t washoe
dial failed: connect 134.197.42.61!7 failed: connection refused
washoe % ipecho u washoe
udp!washoe!echo did not return echo
washoe % echo.udp.srv&
washoe % echo.tcp.srv&
washoe % echo.il.srv&
washoe % 
adir = /net/il/1

netstat
tcp  0    ed          Established 600        login      pyramid.cs.unr.edu
tcp  1    ed          Listen      echo       0          0.0.0.0
udp  0    ed          Dgram       echo       0          0.0.0.0
il   0    ed          Established 5001       exportfs   manzanita.cs.unr.edu
il   1    ed          Listening   echo       0          0.0.0.0
washoe % ipecho u washoe
udp!washoe!echo echoed:
Life is too short to drink bad wine. 
washoe % ipecho i washoe
il!washoe!echo echoed:
Life is too short to drink bad wine. 
washoe % ipecho t washoe
tcp!washoe!echo echoed:
Life is too short to drink bad wine. 
washoe % 

-------------------------------------

The echo C code is based on the example in man page for dial.

ed


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [9fans] Running a server/service??
@ 2000-11-11 16:16 Ish Rattan
  0 siblings, 0 replies; 13+ messages in thread
From: Ish Rattan @ 2000-11-11 16:16 UTC (permalink / raw)
  To: 9fans


I have asked this question before in a different form. I have
tried and am stuck any help will be appreciated.

I want to write a server, call it myserver (works like echo except
prepends a sequence number to the message echoed back). I have code
written based on the example given in net.html/ps document. Now the
question how do I start it? I have seen entries for echo-server
running on port 7:

1. /lib/ndb/common	(tcp=echo  port=7 etc.)
2. /rc/bin/service/tcp7
3. /net/ndb/tcp/7/*

This is ok for system started server. Does one have to go the same route
or one can run a user-level server process whan no write permission is
available on the above parts of namespace?

Further, if I want to run myecho on port 1111 so that a client can talk
to it -- what are the lists of steps to perform? I want to undestand
the process of running a server process??

Thanks in advance.

- ishwar




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2000-11-12 17:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-11 17:55 [9fans] Running a server/service?? anothy
2000-11-12  0:52 ` Boyd Roberts
  -- strict thread matches above, loose matches on Subject: below --
2000-11-12 17:44 anothy
2000-11-12 17:56 ` Boyd Roberts
2000-11-12 17:39 anothy
2000-11-12 17:44 ` Boyd Roberts
2000-11-12 17:14 anothy
2000-11-12 17:35 ` Boyd Roberts
2000-11-12 17:36 ` Boyd Roberts
2000-11-12  0:54 Russ Cox
2000-11-12  1:04 ` Boyd Roberts
2000-11-11 17:20 ed
2000-11-11 16:16 Ish Rattan

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).