A good reading 

https://github.com/robbiehanson/CocoaAsyncSocket

Usable In Swift, even if the umbrella module did not work for me, I had to 
compile it in my own workspace to use it in swift code

Regards 

Gérard 

> Le 3 mai 2016 à 21:17, Tyler Cloutier via swift-users <swift-users@swift.org> 
> a écrit :
> 
> 
>>> On May 3, 2016, at 12:14 PM, Jens Alfke <j...@mooseyard.com> wrote:
>>> 
>>> 
>>> On May 1, 2016, at 11:48 AM, Tyler Fleming Cloutier via swift-users 
>>> <swift-users@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
> 
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to