# Wire protocol

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Wire_protocol
> Markdown URL: https://mediated.wiki/source/Wire_protocol.md
> Source: https://en.wikipedia.org/wiki/Wire_protocol
> Source revision: 1342799255
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Transport-independent method of representing data}}
{{Refimprove|date=December 2009}}

In [computer networking](/source/computer_networking), a '''wire protocol''' refers to a way of getting [data](/source/data) from point to point: A wire protocol is needed if more than one application has to interoperate. It generally refers to [communication protocol](/source/communication_protocol)s higher than the physical layer.<ref name="Definition">{{cite web
| accessdate = 2011-04-11
| publisher = PCMAG.COM
| title = Definition of: wire protocol
| url = https://www.pcmag.com/encyclopedia_term/0%2C2542%2Ct%3Dwire+protocol%26i%3D54750%2C00.asp
| archive-url = https://web.archive.org/web/20121013111507/http://www.pcmag.com/encyclopedia_term/0%2C2542%2Ct%3Dwire+protocol%26i%3D54750%2C00.asp
| archive-date = 2012-10-13
| url-status = live
}}</ref> In contrast to [transport protocol](/source/transport_protocol)s at the transport level (like [TCP](/source/Transmission_Control_Protocol) or [UDP](/source/User_Datagram_Protocol)), the term ''wire protocol'' is used to describe a common way to exchange information at the application level. It refers to an [application layer](/source/application_layer) protocol and defines all the required attributes for the data exchange, like data types (units of data, message formats, etc.), communication endpoints<ref>{{Cite web|url=http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#doc-idp48736|title=OASIS Advanced Message Queuing Protocol (AMQP) Version 1.0, Part 2: Transport}}</ref> and capabilities (such as delivery guarantees, direction of communication, etc.). Usually, the data is represented at the application level as a common [infoset](/source/infoset) (e.g. [XML](/source/XML), [JSON](/source/JSON), [YAML](/source/YAML)) and requires a mechanism of data binding (using e.g. a common encoding scheme like [XSD](/source/XSD)).

The wire protocol may be either text-based or a [binary protocol](/source/binary_protocol). Although an important architectural decision, this is a separate matter from the distinction between wire protocols and programmatic APIs.

In [electronics](/source/electronics), a wire protocol is the mechanism used to transmit data from one point to another.<ref name="Definition"/>

==Functionality==
A wire protocol provides the means for the interoperation of one or more applications in a network. They often refer to distributed object protocols, or they use applications that were designed to work together. As the name suggests, these distributed object protocols run in different processes in one or several computers that are connected over a network.

==Types==
Wire protocols provide the means for a program running under one operating system to communicate with a program running under some other operating system over a network such as an organization's [intranet](/source/intranet) or the [Internet](/source/Internet). The protocol thus interconnects multiple platforms. Some wire protocols are language-independent, allowing the communication of programs written in different [programming language](/source/programming_language)s.

Examples of wire protocols include:

* [IIOP](/source/IIOP) for [CORBA](/source/CORBA)
* [RTPS](/source/Real-Time_Publish-Subscribe_(RTPS)_Protocol) for [DDS](/source/Data_Distribution_Service)
* Java Debug Wire Protocol ([JDWP](/source/JDWP)) for Java debugging
* [JRMP](/source/Java_Remote_Method_Protocol) for [RMI](/source/Java_remote_method_invocation)
* [SOAP](/source/SOAP) for [Web services](/source/Web_services)
* [AMQP](/source/AMQP) for [message-oriented middleware](/source/message-oriented_middleware)
* [https://www.postgresql.org/docs/current/protocol.html PostgreSQL wire protocol]
* [XML-RPC](/source/XML-RPC) is a [remote procedure call](/source/remote_procedure_call) (RPC) [protocol](/source/Communications_protocol) which uses [XML](/source/XML) to encode its calls and [HTTP](/source/HTTP) as a transport mechanism.
* [JSON-RPC](/source/JSON-RPC) is similar to XML-RPC.

==See also==
*[Line code](/source/Line_code)

==References==
{{Reflist}}

{{DEFAULTSORT:Wire Protocol}}
Category:Application layer protocols

---
Adapted from the Wikipedia article [Wire protocol](https://en.wikipedia.org/wiki/Wire_protocol) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Wire_protocol?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
