Home
Categories
Dictionary
Download
Project Details
Changes Log
Who We Are
FAQ
License

Protocol



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.

Built-in protocols

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 AbstractProtocol class to create your own protocol. To create custom Protocols, you have to declare a ProtocolProvider classpath in the manifest of an extension, for example:
      ProtocolProvider=my.protocols.CustomProtocolProvider

See also


Categories: client | dev | network | server | user

Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence