[swift-server-dev] Draft proposal for TLS Service APIs (please review)

Helge Heß me at helgehess.eu
Thu Mar 30 10:25:07 CDT 2017

On 30 Mar 2017, at 16:49, Gelareh Taban <gtaban at us.ibm.com> wrote:
> > > Like the followings:
> > > func tlsWrite(buffer: Collection<UInt8>) throws
> > > func tlsWritev(vectors: Collection<iovec>)
> > >
> > > If it is possible it will be very helpful since
> > > 1) it is very swifty and user friendly
> > > 2) vectorIO could significantly reduce the overhead to merge fragments of bytes into a single buffer.
> >
> > +1 on vectors.
> >
> +1 on need to make it more Swifty.
> What is the advantage of using vectored IO for TLS service?

? Less copying and/or using a single system call for a buffer.

If I have a set of blocks I want to write, I would either have to copy them into a big one just to pass them over to your API, or I would have to call your write API multiple times, which could then result in multiple write() calls.

I guess you could just use DispatchData. I’m not sure whether this is too expensive for some reason (because you may need to have to construct them, etc), or just fine.


P.S.: The DispatchData.Deallocator enum has no .nofree option. Can someone please fix that? Thanks. :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20170330/8d014745/attachment.sig>

More information about the swift-server-dev mailing list