home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / vmsnet / networks / tcpip / ucx / 246 next >
Encoding:
Internet Message Format  |  1993-01-04  |  2.9 KB

  1. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!merlin!iwsd01.itwol.bhp.com.au!wewila
  2. From: wewila@iwsd01.itwol.bhp.com.au (Alan Wilkie)
  3. Newsgroups: vmsnet.networks.tcp-ip.ucx
  4. Subject: Multithreading and subprocesses in UCX
  5. Message-ID: <1993Jan5.081451.30@iwsd01.itwol.bhp.com.au>
  6. Date: 5 Jan 93 08:14:51 +1000
  7. References: <1992Dec24.100456.1@hfrd.dsto.gov.au>
  8. Organization: BHP Information Technology
  9. Lines: 45
  10.  
  11. In article <1992Dec24.100456.1@hfrd.dsto.gov.au>, daniel@hfrd.dsto.gov.au writes:
  12. > Using UCX2.0 under VMS5.5-2.
  13. > When writing TCP/IP servers, is there an elegant method of having VMS sub/det
  14. > processes handle multiple server connections, a'la U**x fork/exec.
  15. > Is multi-threading the server (QIOs and ASTs) the only method?  In which case
  16. > how are Telnet (etc.) connections, that create network processes under a
  17. > different UIC, handled?
  18. > Questions, questions, and so little documentation.  The usual apolgies (FAQ,
  19. > etc.)  With thanks in advance.  Mark Daniel.
  20.  
  21. I may be overlooking something in your question here, but it should be fairly
  22. easy to create a sub/det process to handle a connection.  UCX creates a device
  23. socket to listen on the designated port, and when you actually want to accept
  24. a connection, it creates another device socket for each connection (hence
  25. allowing multithreaded servers because you can have a QIO outstanding on
  26. each device with an AST to handle completion).
  27.  
  28. There are a couple of options then for handling a connection.  If you have
  29. a standalone process listening for the incoming connection, you just accept
  30. the connection and spawn/create another process passing the device UCX gives
  31. you as the input/output channel for the process.  I think this is how the
  32. REXEC/TELNET/etc type servers do it.
  33.  
  34. Alternatively, you can let UCX handle the connection initiation for you.
  35. If you create a service (UCX command "CREATE SERVCE xxxxx") you can specify
  36. a (.COM) file to execute to accept the connection.  When the service is
  37. enabled, UCX starts listening to the specified port and starts a new process
  38. for each incoming connection.  The process executes the .COM file to run the
  39. appropriate server software.  There is also a logical called SYS$NET defined
  40. which is set to the name of the device UCX has created for the connection,
  41. so you then access/read/write/deaccess that device.  This is all fairly
  42. similar to transparent DECnet.
  43.  
  44. Hope this has helped,
  45. -- 
  46. -------------------------------------------------------------------/\/\---
  47. Alan Wilkie, Analyst/Programmer, Process & Engineering Section    / / /\
  48.                 BHP Information Technology, Wollongong Australia / / /  \
  49. Mail      :     P.O. Box 261, Warrawong 2502                    / / / /\ \
  50. Telephone :     +61 42 755667 Fax: +61 42 755215                \ \/ / / /
  51. Internet  :     wewila@iwsd01.itwol.bhp.com.au                   \  / / /
  52. ------------------------------------------------------------------\/\/\/--
  53.