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