Closed wildfiremedia closed 7 years ago
I don't quite understand the question here. Could you elaborate?
I see the file was naming SynchronousTCPServer.swift
, is sock/tcp is running in synchronous instead of asynchronous request that do not block. Every synchronous call waits and blocks for your results to come back?
I'm not 100% sure. This repo was donated to us.
That example server is just used to show off the socket capabilities. It isn't used in Vapor necessarily.
I've recently created a few PRs to make Vapor nonblocking. Watch this issue for updates: https://github.com/vapor/engine/issues/66
Implemented in https://github.com/vapor/socks/releases/tag/1.2.0 (with DispatchSource
)
Is the current implementation use one thread per port/connection in sync rather than async or use DispatchSource/epoll to handle more workload?