Top "Protocols" questions

A common means for (un)related objects to communicate with each other.

Making class conform to protocol with category for existing methods

I have a protocol named MyProtocol. MyProtocol has an required method: - (NSUInteger)length; And some other methods. Now i …

objective-c protocols implementation categories
Sending Login Packet to Minecraft Server in Python Not Working

I have the following script in Python. What it does is tries to connect to a MineCraft server, first by …

python sockets protocols minecraft struct.pack
How to use @objc protocol with optional and extensions at the same time?

This code does not compile and might sound stupid as it is, but i'll explain why it's so important! @objc …

ios objective-c swift protocols swift-extensions
Can a category simultaneously implement a protocol?

If a category I'm creating for a class adds methods that also fulfill the contract set out by a protocol, …

objective-c cocoa protocols categories
BGP vs OSPF and IsIs

Why hasn't BGP completely replaced OSPF and IsIs? What do the other two protocols handle that BGP does not already …

networking protocols bgp
Whats the difference between a scheme and a protocol in a URL?

I'm hoping someone can clarify to me the technical difference between a protocol and a scheme in a url. (or …

url protocols url-scheme
Why can't extensions with protocol conformances have a specific access level?

Assume we have the following example code: protocol MyProtocol { func someFunction() } public class MyClass { } public extension MyClass: MyProtocol { func someFunction() { …

swift protocols swift-extensions access-levels
What is Protocol Oriented Programming in Swift? What added value does it bring?

From Apple's own website: "At the heart of Swift's design are two incredibly powerful ideas: protocol-oriented programming and first class …

objective-c oop swift2 protocols delegation
Swift protocol for string interpolation

What protocol do I have to implement to control the way an object is represented within a string interpolation in …

swift protocols string-interpolation
What are the major differences between HTTP and COAP?

HTTP is mainly used for viewing web pages. Coap is a simplified version of HTTP for IoT or WSNs. Although …

http protocols iot coap