home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / vmsnet / networks / tcpip / multinet / 1779 < prev    next >
Encoding:
Text File  |  1992-07-22  |  3.0 KB  |  81 lines

  1. X-Gateway-Source-Info: INTERNET
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!network.ucsd.edu!mvb.saic.com!tgv.com!info-multinet
  3. Date: 22 JUL 92 16:09:06 GMT
  4. Newsgroups: vmsnet.networks.tcp-ip.multinet
  5. X-Return-path: <info-multinet-relay@TGV.COM>
  6. X-RFC822-From: "Maurice: The Pompatis of love" <ECF_STBO@JHUVMS.HCF.JHU.EDU>
  7. From: "Maurice: The Pompatis of love" <ECF_STBO@JHUVMS.HCF.JHU.EDU>
  8. Subject: simple servers...
  9. X-VMS-To: IN%"info-multinet@tgv.com"
  10. Organization: The INFO-MULTINET Community
  11. Message-ID: <23801D1622JUL92160906@TGV.COM>
  12. Nntp-Posting-Host: Mvb.Saic.Com
  13. Lines: 66
  14.  
  15.  Has anybody had any luck writing a very simple server using MULTINET_SERVER to
  16. setup the connection and the languages run time library to do I/O to the
  17. connection? Basically what I'm wondering is: can I do essentially the equivalent
  18. of decnet transparent task to task...? The FORTRAN program I am using:
  19.  
  20. -----------------
  21. ! It's the HELLO WORLD of servers, an echo server...
  22.  
  23.     implicit none
  24.  
  25.     character*255 buff
  26.     integer nc
  27.  
  28. ! try to open log (just reassigns sys$error so I can get the error info)
  29.     call setlogfile
  30.  
  31. ! open std. I/O
  32.     open(unit=5,file='SYS$INPUT:',status='unknown',
  33.     1    carriagecontrol='list')
  34.     open(unit=6,file='SYS$OUTPUT:',
  35.     1    status='unknown',carriagecontrol='list')
  36.  
  37. ! merely echo whats read back to the output...
  38. 1    format(q,a)
  39. 10    read(5,1,end=99) nc,buff
  40.  
  41. 2    format(a)
  42.     write(6,2) buff(:nc)
  43.  
  44.     goto 10
  45.  
  46. 99    call exit
  47.     end
  48. -------------------------
  49.  
  50. This program is 'installed' with the mu conf/serv command as a new service and
  51. then I test it by telnetting to that port, but the program fails on the 
  52. first open with the following:
  53.  
  54. -------------------------
  55. %FOR-F-NO_SUCDEV, no such device
  56.   unit 5  file _INET53:[MULTINET]FOR005.DAT;
  57.   user PC 00000618
  58. -RMS-F-DEV, error in device name or inappropriate device type for operation
  59. %TRACE-F-TRACEBACK, symbolic stack dump follows
  60. module name     routine name                     line       rel PC    abs PC
  61.  
  62.                                                            00020DC6  00020DC6
  63.                                                            00020CD3  00020CD3
  64.                                                            0001BA3C  0001BA3C
  65.                                                            0001A49A  0001A49A
  66. TEST_SERVER$MAI TEST_SERVER$MAIN                   11      00000018  00000618
  67.  
  68. --------------------------
  69.  
  70. I assume what's happening is dorky RMS is having trouble with the 'mailbox'
  71. INET device, which is weird, since it works with decnet. I can't come up with
  72. any open statement keyword combination that makes it work. Do I have to use the
  73. socket library, and/or $assign and $qio???? I guess it's not the end of the
  74. world, and once I've done it, I'll have a libarary, but it would be so nice to
  75. be able to write little servers like this. If I missing something obvious,
  76. someone please tell me! 
  77.  
  78. Tom O'Toole - ecf_stbo@jhuvms.hcf.jhu.edu - JHUVMS system programmer 
  79. Homewood Computing Facilities, Johns Hopkins University, Balto. Md. 21218 
  80. > * OLX 2.1 * ease!Trim!eeeaaaassse!trimtrimTRIMeeeeeeeaaaaaasse!trimea
  81.