TCP/IP Socket Communication Status, Documentation (OpenInsight 32-bit Specific)
At 28 SEP 2006 06:54:04PM Ray Chan wrote:
TCP/IP socket? Oh sure we do that everyday .
What is the status of OI communicating with other non-OI computers via sockets?
Is it easier to do with OI7.21? Also what documentation is available and any suggestions on tackling this thing.
I got a request from another company to send data to their system using TCP/IP socket communication. Before I get myself in trouble I thought I better ask here first .
I searched and read some of the more recent relevant items. Doesn't sound too straightforward. Is C++ required? Or can we do this from OI? Or a combo? Again any good documentations (OI?), sources, or comments would be nice.
Thanks,
Ray Chan
At 28 SEP 2006 10:56PM Steve Smith wrote:
Ray,
I contributed a bit of code to the sockets routines for 32-bit OpenInsight. It's all done with Basic+. If you thought your plumbing was bad back in 2003, it it was actually the sound of my forehead hitting the desk over about 12 months.
You have to prototype the older Win2000 / NT / Linux wsock32.dll
or the newer XP ws32_2.dll function calls. Luckily in most cases these are interchangeable. Additionally, there's a couple of calls to other windows DLLs depending on what higher level protocols you use. This stuff is available in any sockets / winsock specification text.
The code is simpler if OI is the client (sending requests and catching replies), rather than the server (accepting requests then sending replies). And you have to know whether your connection uses blocking or non-blocking socket calls.
As for documentation… ummm… well the good folks at Revelation are the only folk who are able to provide it. I signed a confidentiality agreement as part of the work.
Bear in mind that OECGI is effectively a sockets interface on port 80, as is the web functionality (FTP / SMTP / HTTP / etc) in OI 7.1 and above. And the new multi-threaded server and the Universal driver is probably addressable via sockets also, although the interfaces would be proprietary.
Having said that, the code is reasonably compact.
I know that Sprezzatura released a Sockets control, and that Dart and Mabry have controls for VB which possibly are compatible with OI, but which are exceptionally fiddly to commission correctly.
Out of curiosity, what are you interfacing to? If it's an ATM, could you please send the money to me in brown paper bags?
Thanks,
Steve
steve@state-of-the-art.com.au
At 29 SEP 2006 11:17AM paxton scott wrote:
Ray,
I don't know if this is helpful for your case, but I did a socket communication with paypal using a php routine which then called my Basic+ program to do the normal database and logic stuff.
Be happy to share my code if it will help you.
paxton@oihelp.com
[url=http://oihelp.com]ARCS, Inc.
At 29 SEP 2006 11:36AM Ray Chan wrote:
Steve,
As I read your response, I felt your headache back in 2003.
Needless to say, this "socket" thing is new, but that's the great thing about this world of ours there is so much to learn and do.
It comforting to know that there's a solution, but I'm not too keen on banging my head.
Unfortunately, we're not interfacing with an ATM. Your comment remind me of the movie "Office Space". Don't know if you saw it. Very funny.
Thanks,
Ray Chan
At 29 SEP 2006 12:52PM Ray Chan wrote:
Paxton,
As I mentioned to Steve, I'm not one for banging my head. I'm fragile.
But as I also said earlier, it is great to learn new things. If you're willing to share your code, that could save on some banging. Thanks.
With the way things are changing, it's possible that this ability to communicate via sockets with other things, as in your example PayPal, will be more important to interconect and work with other non-OI entities (or even other OI apps).
Your PayPal interface with OI sounds pretty cool and neat. I bet others may enjoy seeing this possibilities. I just got my Rev Conference notice. I see that Mike will be talking about OI and Google. Could this be similar to what you have done?
Thanks again,
Ray Chan