Event driven tcpip communications with OI (OpenInsight 32-Bit)
At 04 OCT 2002 03:56:24PM Jeff Warvel wrote:
I would like to have my OpenInsight application be a tcp/ip "server" program that can respond to requests from other applications. I have written a DLL that can "open" an ip socket and "accept" ip connections and receive data. I currently have this functionality working where I have to "poll" with a call to my dll routine to "listen" for data. I would like to have this event driven, so that it only "listen's" for data, when data is available, rather than polling.
Is this possible to do with OpenInsight?
At 04 OCT 2002 04:22PM Pat McNerthney wrote:
Jeff,
Great problem! A little more background on the parameters of this "server" application is needed though.First thought is do you even need OpenInsight to be running? Are all you interested in is fielding your TCP/IP events and then calling OpenEngine to do the work? You could accomplish this using REVCAPI (or the REVCAPI OLE Automation wrapper) from your own executable that is doing the TCP/IP work. When connections or requests come in, you could then call your Basic+ code to do the work. What is nice about this solution is that you could open an OpenEngine per connection, allowing the simutaneous processing of your client requests. This is similar to how OECGI works.Otherwise, if you need OpenInsight running, is there an OpenInsight form active that can be used to field events? You could inform your TCP/IP DLL the Windows handle to the form and then send the form a unique Windows message number when an event has occured. That Windows message number can be fielded by the form, which then calls back into the DLL to find out the details of the event. This is similar to how OICGI works, except that DDE is used instead of a custom DLL.Then again, after thinking this through, I'd probably still use REVCAPI even in this scenario. But in this case, what you want to do is connect to the version of OpenEngine that OpenInsight is currently using.Pat
At 04 OCT 2002 04:30PM Jeff Warvel wrote:
We want to access our Linear Hash table's from and "outside" application. I was just assuming that OpenInsight was going to have to be running. Does it?
We currently are running AREV and have over 15 years of data. We want to get out of the DOS world, but will have to "support" the DOS application during the transition period. So our game plan is to run AREV (Dos application), and develope the windows application.
We wanted to also access the data from the outside applications.
At 04 OCT 2002 04:41PM Pat McNerthney wrote:
We wanted to also access the data from the outside applications.
REVCAPI is your friend.
Pat
At 05 OCT 2002 03:37PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Jeff,
There are myriad decisions you have to make in order to operate a TCP/IP server based application (regardless of the presence of OI32).
We'd recommend you contact us for some more options regarding using sockets from/to OI.
World Leaders in all things RevSoft
At 06 OCT 2002 12:30PM dsig@sigafoos.org wrote:
Here are a couple links from Pat and Bob which show the access of OE from external applications
This Link takes you to Pats demo code for accessing OE from PHP .. works pretty well
This Link takes you bob cartons demo of accessing OE from VB ..
COM/OLE thing is working very very well ..
Now all we need is a real ODBC read/write and we will be 'In Like Flint'
dsig@sigafoos.org onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 971-570-2005
OS: Win2k sp2 (5.00.2195)
OI: 4.1.1
PII 300 laptop
At 07 OCT 2002 02:42PM Jeff Warvel wrote:
Thanks for the tip. I've found the Reference Manual for OpenEngine Version 1.5. This does a great job in documenting the "callable" routines of REVCAP32.DLL and REVSHE32.DLL, but is there a User's manual available?
I'm not sure how to proceed, if I want to open a database, and list out the contents. I've figured out that to get things started I have to do the following calls:
RevRevinitializeAPI();
RevStartLocalEngine(lpPathname, lpDatabase);