Protocols - quick question


#1

I’ve read this chapter twice and think I understand what’s going on.

However, I got up and went for a quick walk somewhere, while I was walking a thought conceived in my head: “Can we think of OOP protocols like network protocols?”

For example the protocol for FTp is port 21 and for HTTPS it’s 443 - with these protocols, I could build a program that does FTP - using the protocol 21.

Or am I missing the point here?


#2

No you are not, abstractly speaking, because a protocol is a set of rules and conventions prescribing how an object providing a service should be accessed without requiring any knowledge about its implementation details.

To be precise, ports are not protocols; ports are parameters required by the protocols. The protocols are FTP and HTTPS application protocols, which are built on top of another protocol: TCP/IP.


#3

So I was on the write track there?

Great now I am a lot clearer on this chapter.

I appreciate your help! :sunglasses: