[swift-users] Server side swift application ?

Tyler Cloutier cloutiertyler at aol.com
Tue May 3 14:17:41 CDT 2016


> On May 3, 2016, at 12:14 PM, Jens Alfke <jens at mooseyard.com> wrote:
> 
> 
>> On May 1, 2016, at 11:48 AM, Tyler Fleming Cloutier via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
>> 
>> libuv and libdispatch overlap on functionality quite a bit, but libdispatch has the benefit of using a block API instead of a function pointer API, which makes memory management easier in Swift.
> 
> I think libdispatch would be the better choice, since it’s what’s going to be used in Swift’s standard library going forward.
> 
>> However, libuv has many additional features for setting up TCP connections and other networking constructs.
> 
> The dispatch_io API lets you use libdispatch with file descriptors, so working with TCP would just involve making the usual system calls to open the connection and then creating a dispatch_io_t from the FD. It should just take a couple of lines of code.

Indeed!

https://github.com/TheArtOfEngineering/Edge/blob/master/Sources/TCP.swift

> 
> —Jens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160503/8ecade34/attachment.html>


More information about the swift-users mailing list