Click to See Complete Forum and Search --> : how to output HTTP requests from the browser to a COM port, without a MODEM, but directly ?


MelAtCST
October 15th, 1999, 01:22 AM
how to output HTTP requests from the browser to a COM port,
without a MODEM, but directly ?
What we need to do is to connect the browser (IE, netscape, mozilla) to a server, that is connected on a COM port, but we donot use MODEM (RAS).
Pierre.

Jason Teagle
October 15th, 1999, 01:59 AM
CreateFile("\\.\COMx", ...);
WriteFile();
ReadFile();
CloseFile();

October 15th, 1999, 08:04 AM
..understand the question.

You know (?) that a browser (IE, Netscape, Mozilla, ..) works using sockets (BSD or Winsock interface), to output a request (HTTP Request).

So, my question was I wanted to get the control of the output (winsock BSD call : send() ) to redistect to a COM port directly,
instead of really trying to (socket) connect, and without a MODEM (RAS also use a COM Port when call number is given).

So the browser (IE) do a connect() and the send() / recv() -> int nSocket is used or returned, NOT a cCOM port.
I wanna know how to EXTERNALLY (because I havent the source code of browser ..) redirect to a COM port ?

If anyone know HOW, or have tips, links, thanx to drop me a line, and you can think youre a Internet/ Windows Guru.
I only need help about these persons.


One word, in response to previous msg:
To open a COM port, use simply CreateFile("COM1", ...) it works.
(But un-appliable, because we dont have source source code of browser to do a CreateFile..)

Waiting for all responses of really GURUS.
Pierre.

Jason Teagle
October 18th, 1999, 02:06 AM
Your question did not say you wanted to intercept and redirect the socket requests.

I cannot see how a server can operate over COM ports without a modem, but there you go.

You might be able to fool the system into thinking it has a RAS connection by tweaking the setting in the registry (I don't know what that setting is, but I'm sure SOMEONE on this site knows it), so that when the browser tries to connect to the internet it thinks it is ALREADY connected. It would then put its requests out to whatever port was registered as being the 'ghost' modem port (again, a registry tweak would be needed for this).

I don't see how else it is possible, unless you plan on trying to write a program that understands the TCP/IP and ethernet layers so that you can intercept packets and redirect them.

October 19th, 1999, 08:10 AM
I don't think the original question is clear enough. For example how he/she wants to connect the browser to a server without a MODEM (direct connect)?
If you connect a browser (PC) to a sever (NT for example) with direct connection, you still can use RAS. You don't need to have MODEM. Once you got connected, the browser can directly call the NT Web server. If this not your case, please address your problem in more detail.

Jason Teagle
October 19th, 1999, 08:19 AM
This sounds good - although I ought to point out that I didn't ask the original question - MelAtCST did. Perhaps you could chat to that poster?

jschulte
October 19th, 1999, 11:01 PM
This is quite simple actually. In Control Panel go to your Modems applet and select Add then tell it "Don't detect my modem; I will select it from a list". Under the (Standard Modem Types) you can select "Dial-Up Netwroking Serial Cable between 2 PCs" and select a COM port.

Do this once for the client, and as many times on the server as you have ports for clients. You will then just need a standard null modem cable inbetween each of the client PCs and the server.