Skip to content

Releases: swhitty/FlyingFox

SocketPool kqueue / epoll

18 Oct 07:13
8ef9edd
Compare
Choose a tag to compare
  • kqueue(2) / epoll(7) events are now used to suspend and resume socket using SocketPool<EventQueue>
  • SocketPool<EventQueue> is now the default pool used by HTTPServer
  • PollingSocketPool has been replaced by SocketPool<Poll>
  • Windows uses SocketPool<Poll>
  • Moved HTTPLogging to FlyingSocks.Logging enabling logs within sockets and pools.
  • Decreased compilation time

epoll Fix

30 Sep 23:25
ee01188
Compare
Choose a tag to compare

Small bug fix for issue within the epoll event queue which can be used on Linux platforms.

Support for kqueue / epoll

19 Sep 10:57
03412e3
Compare
Choose a tag to compare
  • Gracefully finish existing requests then stop server with await server.stop()
  • Retrieve the server listening address with await server.listeningAddress
  • Use makeEventQueuePool() to enable kqueue(2) on Darwin platforms and epoll(7) on Linux.
  • PollingSocketPool remains the default socket pool.
  • Fixes WebSocket bug where connection would not be removed after disconnection.
  • Fixes for Swift 5.7 related warnings

Swift 5.7 Support

29 Aug 04:50
7cdc982
Compare
Choose a tag to compare

0.7.0

04 Jun 05:08
4eb0054
Compare
Choose a tag to compare
  • import FlyingSocks module exposes the underlying async sockets that power FlyingFox
  • HTTPServer can be started with any AsyncSocketPool.
  • PollingSocketPool can be tuned to control the interval before and after each loop.
  • Improved concurrency checking support on Swift 5.6
  • Experimental support for Windows 10

0.6.0

28 Mar 00:27
45e3cca
Compare
Choose a tag to compare
  • WebSocketHTTPHandler enables support for WebSockets allowing handlers to exchange pair of AsyncStream.
  • DirectoryHTTPHandler to automatically share all files within a directory.
  • Groups sockaddr structures with protocol SocketAddress
  • Supports UNIX-domain sockets via sockaddr_un

0.5.0

13 Mar 23:33
65c808e
Compare
Choose a tag to compare
  • Responds to socket hangups via POLLHUP, POLLERR and POLLNVAL
  • HTTPServer reliably throws error when listening socket is suspended in background (iOS).
  • Corrects IPv6 address that appears in logs.

0.4.1

07 Mar 04:26
45f5584
Compare
Choose a tag to compare

Fixes bug where sockets where not polling for write events POLLOUT at all 😱

0.4.0

06 Mar 04:52
e5d510c
Compare
Choose a tag to compare

Several enhancements have been made to HTTPRoute that enable fine grained pattern matching of requests.

Query items can now be matched:

await server.appendRoute("GET /meal?side=fish", to: .file(named: "meal-fish.json"))
await server.appendRoute("GET /meal?side=chips", to: .file(named: "meal-chips.json"))

HTTP headers can also be matched:

let json = HTTPRoute("*", headers: [.contentType: "application/json"])
let xml  = HTTPRoute("*", headers: [.contentType: "application/xml"])

await server.appendRoute(json, to: .file(named: "sample.json"))
await server.appendRoute(xml, to: .file(named: "sample.xml"))

And request body can also be matched:

public protocol HTTPBodyPattern: Sendable {
  func evaluate(_ body: Data) -> Bool
}

Darwin platforms can pattern match a JSON body with an NSPredicate:

let route = HTTPRoute("POST *", body: .json(where: "food == 'fish'"))
{"side": "chips", "food": "fish"}

0.3.1

28 Feb 06:02
6645565
Compare
Choose a tag to compare

Renamed CompositeHTTPHandler to RoutedHTTPHandler