olliNiinivaara / GuildenStern

Modular multithreading HTTP/1.1 + WebSocket server framework
MIT License
80 stars 7 forks source link

use `replyStart` `replyFinish` combine with os `sendfile` #21

Closed bung87 closed 10 months ago

bung87 commented 10 months ago

basic logic like below, I run my example, but it didn't response. full example here: https://github.com/bung87/scorper_v2/blob/main/examples/send_attachement.nim

replyStart(Http200, info.size, unsafeAddr joinedheaders)
discard sendfile(http.socketdata.socket.int, handle, 0, s)
replyFinish()
bung87 commented 10 months ago

NVM, it works, my bad, I imported a file that start a server cover this server.