Groups | Search | Server Info | Login | Register
Groups > comp.os.os2.programmer.misc > #1915
| From | Paul Edwards <mutazilah@gmail.com> |
|---|---|
| Newsgroups | comp.os.os2.programmer.misc |
| Subject | TCP/IP options |
| Date | 2024-03-26 15:02 +0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <uttrtd$1lrs8$1@dont-email.me> (permalink) |
I have spent most of the last 3-4 decades writing C90 applications, and since TCP/IP is not part of C90, I haven't had anything much to do with it. Using qemu I can connect a COM port to an IP address, so I was able to write a crude nntp program that did read/write to com1:. Even this was abstracted. COM1: was just a filename to my app, and I opened it as "r+b" and did an fseek of 0 from current position to switch between read and write (a C90 requirement). That code is here: https://sourceforge.net/p/pdos/gitcode/ci/master/tree/src/pdpnntp.c But a more generic app, allowing the user to provide an address and connecting to that, cannot use the above trick. And especially a web browser can't do that, as I believe you need to disconnect and reconnect whenever you want to get a new page as it is stateless. Although I suspect that I can probably use qemu and com1 if I just want to retrieve the text at http://pdos.org - I will try that. So I do have one application that takes me outside the capabilities of C90 fread/fwrite/fseek: https://sourceforge.net/p/mvs380/mvssrc/ci/master/tree/ozpd/c/modem.c And for whatever historical reason, I ended up using the Unix API, and then Cygwin to allow that to run on Windows. So that covers Linux and Windows - assuming I want to stay with that interface. I don't know what the native capabilities of OS/2 or ArcaOS are, and nor do I know whether there is something like Cygwin available for OS/2. I could in fact write my own Cygwin for OS/2 that is limited to just the TCP/IP functionality. One thing that I don't like about the Unix interface is that it uses "close" to close a socket, requiring the OS to distinguish between sockets and files. However, that's probably not a problem for me, as I only access files via fopen in my apps, so close can be dedicated to sockets. Any idea where I stand? So this is for the limited goal of a mini browser that can read HTML pages in plain text and print the text to the screen. And the browser will be public domain C90 code other than the TCP/IP library extensions (whatever is used). But my limited goal should still cover Windows, OS/2 and Linux (but I am happy to write code to interface with the underlying native libraries). And I would normally target Windows 95 and OS/2 2.0 as the lowest common denominator, but I can move forward if there is a compelling reason to do so. At this stage I am not trying to compete with Firefox or anyone else. Just a very limited goal. Thanks. Paul.
Back to comp.os.os2.programmer.misc | Previous | Next — Next in thread | Find similar
TCP/IP options Paul Edwards <mutazilah@gmail.com> - 2024-03-26 15:02 +0800
Re: TCP/IP options Paul Edwards <mutazilah@gmail.com> - 2024-03-26 16:32 +0800
Re: TCP/IP options Paul Edwards <mutazilah@gmail.com> - 2024-03-26 19:34 +0800
Re: TCP/IP options Paul Edwards <mutazilah@gmail.com> - 2024-03-26 19:53 +0800
Re: TCP/IP options Paul Edwards <mutazilah@gmail.com> - 2024-03-27 07:36 +0800
csiph-web