about summary refs log tree commit diff stats
path: root/src/io/socketstream.nim
Commit message (Collapse)AuthorAgeFilesLines
* Various refactorings & fixesbptato2024-02-141-70/+21
| | | | | | | | * disallow Stream interface usage on non-blocking PosixStreams * do not read estream of forkserver byte-by-byte (it's slow) * do not call writeData with a zero len in formdata * do not quote numbers in mailcap quoteFile * remove some unused stuff
* loader: fixes & cleanupbptato2024-02-101-2/+4
| | | | | | | | | | | * LoaderHandle.fd is no more, we now check ostream's fd * setBlocking converted to a PosixStream method * SocketStream now sets fd variable * handle sostream/fd redirection properly * fix suspend/resume This fixes non-HTML resource loading, mostly. However, tee is still broken :/
* loader: use recvData instead of readDatabptato2024-02-091-0/+10
| | | | | | | | recvData is a new method for PosixStream that does less weird magic than readData. Also, allow duplicates in unregWrite/unregRead; it's simpler to live with them than to prevent them.
* Incremental renderingbptato2024-02-071-2/+9
| | | | | | | | | | | | Yay! Admittedly, it is not very useful in its current form, except maybe on very slow networks. The problem is that renderDocument is *slow*, so we only run it when onload fails to consume all bytes from the network in a single pass. Even then, we are guaranteed to get a FOUC, since CSS is only downloaded in finishLoad(). Well, I think it's cool, anyway.
* loader: clean up error handlingbptato2024-01-261-8/+14
| | | | | | | | | * remove pointless exception -> bool conversions; usually they were ignored anyway + exceptions are more convenient here * add EPIPE handler to raisePosixIOError * fix socketstream to use raisePosixIOError * fix socketstream sendFileHandle error handling * cgi: immediately return on file not found error
* Use std/* imports everywherebptato2024-01-071-5/+5
|
* socketstream: get rid of emitsbptato2023-12-181-50/+15
| | | | Use .compile, as that is supported by nlvm too.
* socketstream, serversocket: portable bindUnixbptato2023-12-141-1/+6
| | | | | reimplementing it portably in Nim seems incredibly annoying, so we just use C
* reduce new() usagebptato2023-10-251-7/+8
|
* socketstream: get rid of pointer arithmeticbptato2023-10-181-2/+4
|
* move around more modulesbptato2023-09-141-0/+147
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* Move ips stuff to src/ips/bptato2022-11-221-54/+0
|
* Incremental loading of text files, etc.bptato2022-11-201-2/+6
|
* Add JS binding generationbptato2022-09-121-11/+24
|
* Use unix domain sockets for IPCbptato2022-09-061-0/+37