aboutsummaryrefslogtreecommitdiffstats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-20 16:54:40 +0200
committerbptato <nincsnevem662@gmail.com>2024-10-20 16:54:40 +0200
commitd29105fa71f315816ce03c1e5f89423b65b3b389 (patch)
tree7a46c8ce69328ce0ad2659d123e264a8e8cf6c93 /src/types
parentddb0ba9eb1454b15ba6db7c109ce23c448ddd66e (diff)
downloadchawan-d29105fa71f315816ce03c1e5f89423b65b3b389.tar.gz
dynstream: refactor
* consistently use cint instead of FileHandle - this was another remnant of winapi support; on posix, they are the same. * move "blocking" field to PosixStream * recvFileHandle -> recvFd, sendFileHandle -> sendFd * merge serversocket into dynstream * merge auxiliary C functions into dynstream_aux
Diffstat (limited to 'src/types')
-rw-r--r--src/types/blob.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/types/blob.nim b/src/types/blob.nim
index 672163a0..ea5c588d 100644
--- a/src/types/blob.nim
+++ b/src/types/blob.nim
@@ -18,7 +18,7 @@ type
buffer*: pointer
opaque*: pointer
deallocFun*: DeallocFun
- fd*: Option[FileHandle]
+ fd*: Option[cint]
WebFile* = ref object of Blob
webkitRelativePath {.jsget.}: string
@@ -87,7 +87,7 @@ proc finalize(blob: Blob) {.jsfin.} =
proc finalize(file: WebFile) {.jsfin.} =
Blob(file).finalize()
-proc newWebFile*(name: string; fd: FileHandle): WebFile =
+proc newWebFile*(name: string; fd: cint): WebFile =
return WebFile(
name: name,
fd: some(fd),