home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22243 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.9 KB

  1. Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!usc!davidp
  2. From: davidp@stealth.usc.edu (David Peterson)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: MacTCP - getservbyname code, anyone - inetd server
  5. Date: 26 Jan 1993 12:21:22 -0800
  6. Organization: University of Southern California, Los Angeles, CA
  7. Lines: 29
  8. Distribution: world
  9. Message-ID: <1k46g2INN3kq@stealth.usc.edu>
  10. References: <bobert.727074187@godzilla> <1j73beINN78i@stealth.usc.edu> <bobert.727567325@godzilla> <1993Jan22.185307.20294@dtint.uucp>
  11. Reply-To: davidp@usc.edu
  12. NNTP-Posting-Host: stealth.usc.edu
  13.  
  14.  
  15. In article <1993Jan22.185307.20294@dtint.uucp>, tom@dtint.uucp (Thomas R. Kimpton) writes:
  16. |> I've thought, and I'm sure others have, about writing an "inetd"
  17. |> program for the mac that would provide services on the mac.  It
  18. |> would have a services file that had the service name, protocol
  19. |> (UDP/TCP), port number, and program to launch.  However, I came
  20.  
  21. I've done this. I'm in the process of debugging it and writing it up as a
  22. possible MacHack paper. Send me mail if you want a copy of it to test out.
  23. Right now I've got an inetd, control panel to configure it, fingerd, rshd,
  24. and a one-way rcp.
  25.  
  26. |> across a major snag:  When you create a MacTCP stream you have
  27. |> to give it a buffer for input buffering.  There is no provision
  28. |> for replacing the existing buffer with a new one. This means that
  29. |> if I want to have my program setting on a port, then hand that
  30. |> port to another program, the memory buffer will come from
  31. |> my heap, and if I quit, the buffer I handed off with the
  32. |> stream is no longer valid.  While it's possible to do, it wouldn't
  33.  
  34. Allocate memory for the MacTCP buffer in the system heap. This came
  35. from DTS as the safest place to put shared memory.
  36.  
  37. I hadn't thought about chaning the buffer size on a per-stream basis,
  38. I just make them all 8k. It wouldn't be hard to put an extra parameter
  39. in the configuration specifying buffer size though.
  40.  
  41.  
  42. -dave.
  43.