Archive-Date: XXX, 9 Jul 1996 19:28:53 GMT Subject: Vax Basic Socket Programming Message-ID: <4rubtl$qe9@news0-alterdial.uu.net> From: Kuff@Access.Digex.Net (Hal Kuff) Date: 9 Jul 1996 19:28:53 GMT Reply-To: Kuff@Access,Digex.Net Content-Type: Text/Plain; charset=US-ASCII Hi, Anyone done Vax Basic socket programming? Any examples? Hal Kuff Kuff@tessco.com ================================================================================ Archive-Date: XXX, 11 Jul 1996 15:19:16 -0400 Subject: Re: Vax Basic Socket Programming Message-ID: <1996Jul11.151916@process.com> From: volz@process.com (Bernie Volz) Date: 11 Jul 96 15:19:16 -0400 References: <4rubtl$qe9@news0-alterdial.uu.net> In article <4rubtl$qe9@news0-alterdial.uu.net>, Kuff@Access.Digex.Net (Hal Kuff) writes: > Hi, > > Anyone done Vax Basic socket programming? Any examples? > > Hal Kuff > Kuff@tessco.com > I'd recommend using the SYS$QIO/SYS$QIOW calls directly if you can. This should be easier than dealing with the socket routines directly (and for the most part isn't that difficult to do). How to use system-services in general is documented (if I recall) in the BASIC documentation set. Another nice feature of using these is you can use the nice VMS services (such as event flags and asynchronous system traps) to do real-time event driven programming. Doing that via sockets means you have to use polling (select). Calling the socket routines from BASIC should be doable provided you understand the calling standards and how C passes arguments. C passes arguments by value and by reference. Strings are null-byte terminated and passed by reference. You also have to make sure that you allocate sufficient space for strings that return data and understand that a null-byte will terminate them. This means if you're going to use them with BASIC, you need to "fix" them up upon return (as well as before calling the routine). Access to C data structures is also possible. Perhaps using something like the MAP/REMAP statements in BASIC? Or, declaring the entire structure as a string and pulling out the various pieces (via the CVT$x functions). - Bernie Volz Process Software Corporation BTW: It has been a while since I used VAX BASIC and I never did use it much.