Author | Topic: Ignorant Socket question | |
---|---|---|
Bruce Anderson | Ignorant Socket question on Wed, 23 Aug 2006 12:44:33 -0500 I am just beginning to learn about sockets, so forgive the dumb question, but I haven't seen an example similar to my situation. I have a Win 2003 server performing multiple duties; two of them being web hosting and credit card processing. The credit card gateway app is ViaWarp, used by Nova Information Systems. At present, I work this process by building a data text file in a specfic directory where it is read by the gateway app which then transmits the data to a distant processing center. The gateway app receives a responce from the processing center and writes the outcome information to a file which my app retrieves and processes. Alternately, ViaWarp will accept input data as an HTTP POST message over a socket connection and will return the response as an HTML page. To do this, I need to open a socket connection to the ViaWarp server. Here comes the dumb question. Is it possible to open a socket connection to the gateway software when all applications are running in a single computer, a socket connection where the communication never leaves the machine? Is there a code sample available, or is this trivial? Thank you, Bruce Anderson | |
mark carew | Re: Ignorant Socket question on Thu, 24 Aug 2006 08:57:38 +1000 Hi Bruce, Xb2net does exactly that. you can have an httpserver running on a pc listening for requests from an httpclient. The trick is that the server is running on localhost and the client socket request is also sent to local host. When you are ready to go live you change the end-point that the client wants to communicate with to the real http(s):\\ in the external world. So you can build your client on one box by talking through localhost (127.0.0.1) or you could use a c class address of another pc running behing your firewall. So you build your client. Either build or obtain a dummy host. Test client comms locally. Then test over the internet. Regards Mark | |
Bruce Anderson | Re: Ignorant Socket question on Wed, 23 Aug 2006 19:45:47 -0500 |