Skip to content

Releases: olliNiinivaara/GuildenStern

7.2.1

05 Nov 08:04
d5f405b
Compare
Choose a tag to compare
  • Compatibility with Nim version 2.2.0
  • Support removed for 6.x series, please upgrade now
  • Fixed "Compile error: type mismatch: got 'int64' for [...]"

7.2.0

07 Aug 16:53
Compare
Choose a tag to compare
  • Compatibility with ARM architecture
  • Bug fix: getUri etc. in the new compact http server mode
  • Bug fix: failed read in the new compact http server mode

7.1.0

10 Jun 18:54
18c5b55
Compare
Choose a tag to compare
  • All threads are initialized when their server is started (instead of when they are first used), making the system more fail-fast
  • - is an accepted char in header field names
  • WebSocketServer code clean-up: WebSocketContext removed; opcode not anymore visible to end users
  • Minor fixes and improvements

7.0.0

01 Jun 09:08
Compare
Choose a tag to compare

Release notes, 7.0.0 (2024-06-01)

StreamingServer has been merged to HttpServer

  • receiveInChunks iterator renamed to receiveStream
  • maxrequestlength renamed to bufferlength
  • newHttpServer does not anymore take hascontent parameter, but instead:
  • newHttpServer takes contenttype parameter:
    • Compact (the default mode): Equivalent to previous hasContent=true mode, where whole request body must fit into the buffer
    • NoBody: Equivalent to previous hasContent=false mode, for optimized handling of requests like GET that do not have a body
    • Streaming: Equivalent to previous StreamingServer, where you have to read the body yourself using the receiveStream iterator
  • startDownload-continueDownload-finishDownload combo renamed to replyStartChunked-replyContinueChunked-replyFinishChunked

Header processing streamlined

  • parseHeaders and parseAllHeaders obsoleted
  • newHttpServer takes headerfields parameter, listing header fields that you need
  • in request handlers http.headers StringTableRef is automatically populated with needed header key-value pairs

New MultipartServer

  • handles multipart/form-data for you as neatly parsed
  • operates in streaming manner, allowing huge uploads without blowing up RAM

Improvements to websockets

  • If you do not accept a connection (reply false in upgradeCallback), a HTTP 400 reply is now automatically sent before the socket is closed
  • PONG is now automatically replied to PINGs, sendPong proc is removed
  • default reply values changed, now timeoutsecs = 10, sleepmillisecs = 10
  • if all in-flight receivers are blocking, now suspends for (sleepmillisecs * in-flight receiver count) milliseconds
  • fixed isMessage bug

6.1.0

02 Sep 17:48
Compare
Choose a tag to compare
  • fixed nimble path
  • fixed README example
  • new receiveInChucks iterator in streamingserver for receiving big data, for example POST data that does not fit in main memory
  • new startDownload-continueDownload-finishDownload combo in streamingserver for sending big and/or dynamic responses as Transfer-Encoding: chunked
  • new and upgraded streamingserver examples as required

6.0.0

23 Aug 16:05
7253a14
Compare
Choose a tag to compare
  • major rewrite, breaking changes here and there, consult migration guide and code examples.
  • dispatcher(s) can now be replaced just by changing import(s)
  • every TCP port is now served by different server, allowing port-by-port configuration of resource usage
  • non-blocking I/O with cooperative multithreading now used everywhere
  • new suspend procedure for allowing other threads to run also when waiting for I/O in user code
  • overall compatibility with Nim version 2.0
  • single-threaded mode is no more
  • TimerCtx is no more

5.1.0

06 Feb 15:58
Compare
Choose a tag to compare
  • new multiSend proc for WebSockets: can be called from multiple threads in parallel
  • better default logging
  • other fixes

5.0.0

22 Sep 10:24
4b322bd
Compare
Choose a tag to compare
  • Breaking change: If you use timer handlers, you must now import guildenstern/timerctx
  • Refactored timer handlers to use same logic as other handlers
  • New proc removeTimerCtx for stopping timers
  • new logging implementation supporting multiple log levels, -d:fulldebug obsoleted
  • performance optimization: threadpool now incorporates a (lock-free) task queue

4.0.0

06 Sep 15:13
Compare
Choose a tag to compare
  • serve proc now accepts the amount of worker threads to use
  • registerThreadInitializer is now a global proc (not tied to a GuildenServer)
  • ctxWs web socket upgrade now accepts a callback closure (instead of initial message to send)
  • can listen to multiple ports even with same handler (just register different handler callback proc for each port)
  • new ctxBody handler for efficiently handling POST requests.
  • new isRequest proc for efficiently inspecting request content
  • new custom threadpool
  • code fixes and cleanups

4.0.0-rc1

11 Aug 14:02
Compare
Choose a tag to compare
  • registerThreadInitializer is now a global proc (not tied to a GuildenServer)
  • new setWorkerThreadCount proc for (optionally) setting the amount of worker threads
  • new isRequest proc for efficiently inspecting request content
  • removed dependency on stdlib threadpool
  • code fixes and cleanups