Implementing NWProtocolFramerImplementation in ObjC / C

Hi Everyone,

Seeing that most of the resources out there are 'primarily' geared towards supporting swift, some of us such as myself still fancy Objective-C. I am currently working on a network project and I'm considering writing my own framer to just get a feel for how it works but I'm seriously running into issues with how to do this. for example:

how would I begin doing this in C

final class FrProtocol:NWProtocolFramerImplementation{ }

which requires creating a definition passing in the class itself

NWProtocolFramer.Definition(implementation: FRProtocol.self)

I had a look at framer_options.h and although I see some of the functions that need to be implemented when conforming to the above said protocol. It's confusing to say the least how to begin. It would be nice to have samples that are written for Objective-C.

Any help would be most appreciated.

how would I begin doing this in C

Checkout the C implementation here. The documentation say ObjC but these are C APIs.

Then you'll want to look at the following APIs:

Hi Meaton, pardon the late reply, thanks for sharing the links. I believe I have already looked at those but I'll review Them again, perhaps they'll make more sense. Thanks.

Implementing NWProtocolFramerImplementation in ObjC / C
 
 
Q