A protocol is the way that different devices communicate. Some protocols are TCP/IP, Samba, NetBIOS HTTP.

A definition of rules of communication between two or more nodes through a medium. The nodes can be computers, people, countries, or other things. The medium can be speech, snail mail, a network or other kind of wire, or anything else that can carry a signal or message.

A field in a datagram, or IP packet header. Analagous to the type field in a network frame. The value it contains specifies which high-level protocol was used to create the message carried in the DATA area of the datagram. It specifies the format of the data area. The mapping between the protocol and the integer value used in this field must be administered by a central authority to guarantee agreement.

Some protocol numbers:

1 - ICMP
6 - TCP
17 - UDP
88 - IGRP
89 - OSPF
"Protocols" are, along with categories (see my writeup under Category), how Objective C handles mix-ins and how it gets around the fact it does not have multiple inheritance. Protocols and categories encompass one of the more visible bits of Objective C's Smalltalk heritage, and are taken together really rather similar to a more nimble (in my opinion, anyway) equivalent of the interface )("implements") capability in java. Protocols greatly simplify certain odd issues of class structure and polymorphism that are very clumsy to deal with.

Basically all a protocol does is group classes by functionality; a protocol prototypes a certain number of methods, and if a class adopts a protocol it is agreeing to implement every single one of the methods specified in the protocol. The class can then be described by the type of the protocol, and in general can be treated as if the protocol was a class it had inherited from.

If we were going to create a protocol named DemoProtocol, the syntax would look like this:

In DemoProtocol.h:

@protocol DemoProtocol
    - thing1;
    - thing2;
@end
If class HypotheticalClass wanted to adopt DemoProtocol, all it would have to do is add it to the end of its @implementation line surrounded by <html brackets>, for example changing @implementation HypotheticalClass to @implementation HypotheticalClass <DemoProtocol>. Categories can adopt protocols, and protocols can adopt other protocols, in the same way. Any of these can adopt multiple protocols, by listing multiple protocols between the <> brackets separated by commas. If a class has adopted DemoProtocol by any of these means, it *must* implement methods named thing1 and thing2. Any class that has adopted DemoProtocol, however, can be passed in methods and functions as (DemoProtocol *), and the type checking system will be fine with that.

Protocols let you abstractly describe a functionality that could be implemented by a variety of classes in different ways; for example, NeXTStep has a protocol for event handlers. Without protocols, either all event handlers would have to be subclasses of NSEventHandler, which would be unrealistic and restrictive, or the event handling functions of NeXTStep would have to simply assume any id passed to it supports the event handling methods, without the benefit of compile-time type checking etc.

The @protocol @-directive can be used in three ways: to declare a protocol, as outlined above; to alert the compiler to the existence of a protocol defined in another file, the same way the @class directive works (see my writeup under @); and to return a protocol object (Every protocol has a corresponding instance variable of class Protocol; you can say @protocol( DemoProtocol ) somewhere in your code, and it will return a pointer to the protocol instance variable corresponding to DemoProtocol. There are defined in NSObject both class method and instance methods named conformsToProtocol(Protocol *)aProtocol; you send this message to any object, and it returns a BOOL stating whether the object adopts aProtocol, which you find the value of by using the @protocol() directive.

The language-imposed protocols i have just described are often called "Formal Protocols"; there is also something called an Informal Protocol (see the node).

proprietary = P = provocative maintenance

protocol n.

As used by hackers, this never refers to niceties about the proper form for addressing letters to the Papal Nuncio or the order in which one should use the forks in a Russian-style place setting; hackers don't care about such things. It is used instead to describe any set of rules that allow different machines or pieces of software to coordinate with each other without ambiguity. So, for example, it does include niceties about the proper form for addressing packets on a network or the order in which one should use the forks in the Dining Philosophers Problem. It implies that there is some common message format and an accepted set of primitives or commands that all parties involved understand, and that transactions among them follow predictable logical sequences. See also handshaking, do protocol.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.

A term used in history to reference the deliberately obfuscating collection of terms that Nazi's directly involved with the Final Solution were taught to use. (i.e. "final solution" "relocation")

The purpose of this protocol was to allow for a more efficient and expedient extermination operation by allowing those directly involved a sort of blissful ignorance towards their actions.

For further reading see: Eichmann in Jerusalem By Hannah Arendt.

Pro"to*col (?), n. [F. protocole, LL. protocollum, fr. Gr. the first leaf glued to the rolls of papyrus and the notarial documents, on which the date was written; prw^tos the first (see Proto-) + glue.]

1.

The original copy of any writing, as of a deed, treaty, dispatch, or other instrument.

Burrill.

2.

The minutes, or rough draught, of an instrument or transaction.

3. Diplomacy (a)

A preliminary document upon the basis of which negotiations are carried on.

(b)

A convention not formally ratified.

(c)

An agreement of diplomatists indicating the results reached by them at a particular stage of a negotiation.

<-- 4. A strict code of etiquette for conduct of behavior among diplomatic or military personnel. 5. A detailed plan for conduct of a scientific or medical experiment or procedure. A term used especially in conduct of medical research requiring approval of a regulatory agency. -->  

© Webster 1913.


Pro"to*col, v. t.

To make a protocol of.

 

© Webster 1913.


Pro"to*col, v. i.

To make or write protocols, or first draughts; to issue protocols.

Carlyle.

 

© Webster 1913.

Log in or register to write something here or to contact authors.