A protocol is bound to an underlying network which hold the characteristics of the "port" used for its communication. A communication protocol is used for the two sides of the communication, which means that any means of communicating data between Client and Server can be used.
The most simple of all protocols is an UDP protocol, (using UDP sockets), with one port for Client => Server communication, and one port for Server => Client communication. But any other mean of communication can be used, including non UDP protocols, or protocols using only one "port" equivalent for all communications. Developers are free to implement any Protocols they choose to, and even to add custom protocols as Extensions.
Note that even if UDP or TCP protocols use the notions or ports and hosts, protocols can even not use these notions at all. For example, the SharedMemoryProtocol uses direct ByteBufer communication to send or receive datas, and don't use ports or hosts. It is even not required to use separate communication for inputs or outputs.
The framework has several built−in protocols which can be used in the most common of use cases. The two most commonly used are:
- "udp" (the default): an UDP protocol with two separate ports for the input and output sockets
- "tcp": a TCP protocol with two separate ports for the input and output sockets
Two more specific built−in protocols are also provided:
- "webserver": WebServerProtocol − a TCP protocol with only one port for both inputs and outputs, particularly well−suited for using J661 in an Applet, or in secure environents where the Server is not allowed to create sockets by itself
- "sharedmemory": SharedMemoryProtocol − a Protocol where the communication is send / received through shared memory, which can be used when J661 is embedded in an external C/C++ process
Creating your own protocol
The framework does not make any assumptions on the Network the procotol will use. You can use safely the
class to create your own protocol. To create custom Protocols, you have to declare a
classpath in the manifest of an extension, for example:
- Network: The J661 project allows to specify the configutation of the Network which allows the UA (Client) and the CDS (Server) to communicate at runtime
Copyright 2016 Dassault Aviation. All Rights Reserved. Documentation and source under the GPL v2 licence