[gnutls-devel] TCP Fast Open
Tim Ruehsen
tim.ruehsen at gmx.de
Thu Jul 14 11:56:59 CEST 2016
On Thursday, July 14, 2016 11:44:00 AM CEST Nikos Mavrogiannopoulos wrote:
> On Wed, 2016-07-13 at 17:42 +0200, Nikos Mavrogiannopoulos wrote:
> > On Wed, 2016-07-13 at 16:50 +0200, Tim Ruehsen wrote:
> > > Hi Nikos,
> > >
> > > a question regarding the implementation...
> > >
> > > The new function
> > > void
> > > gnutls_transport_set_fastopen(gnutls_session_t session,
> > >
> > > struct sockaddr *connect_addr, socklen_t
> > >
> > > connect_addrlen)
> > >
> > > needs sys/socket.h included in gnutls.h(.in). Is that ok for you,
> > > or
> > > how would
> > > you like me to proceed ? Doing so might break the build on some
> > > platforms...
> >
> > We can introduce a new header such as gnutls/socket.h. Even if now,
> > it is for a single function it may pay off in the future by having
> > other features specific for sockets and the default callbacks.
>
> On second thought, this is not necessary. struct sockaddr * is simply
> a pointer, so we can use it without including any header, similarly
> to what we do for gnutls_session_t. We can define struct sockaddr;
> somewhere in the header before the fastopen function.
I have the gnutls/socket.h already done (I start testing gnutls-cli --fastopen
in a minute...).
Also, how do we avoids conflicts if someone includes gnutls.h and sys/socket.h
- redefining sockaddr would result in a compilation error...
Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20160714/4971bbfc/attachment.sig>
More information about the Gnutls-devel
mailing list