Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,876 of 4,255    |
|    mutazilah@gmail.com to All    |
|    Re: HTML terminal    |
|    17 Oct 21 15:03:37    |
      From: muta...@gmail.com              On Sunday, October 17, 2021 at 6:40:56 PM UTC+11, JJ wrote:       > On Sat, 16 Oct 2021 01:29:32 -0700 (PDT), muta...@gmail.com wrote:       > > I moved a step closer to an HTML terminal with the below       > > code. Someone else provided the Javascript so I don't know       > > how to get rid of the utf8 stuff yet.       > >       > > One thing that surprised me was that unlike an nntp or telnet       > > session, http seems to send an HTML page and then it never       > > gets a response back, ie the read() just sits there. It seems that       > > the browser is designed to ignore that open connection (neither       > > end seems to close it) and then it starts a brand new connection.       > > This means I didn't get the expected "GET /?key=X'.       > >       > > My desire is for PDOS/386 to effectively open a serial port       > > connection to a BBS that is emitting HTML code instead of       > > ANSI escape sequences. As such, I need the "GET /" to go       > > up via the same line. There's not really a concept of a new       > > connection.       > >       > > But because I would like the BBS to be able to operate with       > > a normal web browser too, I think the BBS needs to be       > > defined to have either persistent http connections or       > > non-persistent. ie both forms are valid.       > >       > > Unless there's a way to get the browser to keep the       > > connection open?       > >       > > Note that my htmlterm application running under PDOS/386       > > won't bother actually interpreting that javascript, it will just       > > assume that the javascript is soliciting a keystroke and send       > > a "GET /?key=whatever" up the serial line.              > Use the appropriate HTTP request header to keep the connection open.       > However, the HTTP server must also support the header.              I'm confused by this. It seems to be the browser that is       initiating a new request instead of reusing the current       connection. Maybe that's a Javascript limitation?              Regardless, I tried sending this:              #define KEEP_ALIVE "HTTP/1.1 200 OK\r\n" \        "Connection: Keep-Alive\r\n" \        "\r\n"              before the HTML page, but it didn't change the behavior.              > Though IMO, it's better to use WebSocket for this kind of purpose.              Note that the goal is for the server to be very simple, rendering       an HTML page instead of an ANSI terminal. Just a whole lot of       lines with |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca