The element connector tcp netty is a transport layer for RFC 8323 - CoAP over TCP based on the common netty.io library.
It is still experimental and based on a early draft version of that RFC.
In order to provide TCP/TLS specific configuration, the definitions of TcpConfig are used. These definitions are included in the element-connector in order to be able to use TCP as optional library only at runtime. See cf-cli-tcp-netty for a client example.
A client may use a TcpClientConnector or TlsClientConnector and provide that as Connector
to the CoapEndpoint
. Once the connection is established, the coap-role (coap-client or coap-server) may be exchanged.
A server may use a TcpServerConnector or TlsServerConnector and provide that as Connector
to the CoapEndpoint
. Once the connection is accpeted, the coap-role (coap-client or coap-server) may be exchanged.
If you want to build and install element connector tcp netty from source, simply run
mvn clean install
in the project's root directory.
The element-connector-tcp-netty
folder contains the source code for the element-connector-tcp-netty
library.
Generally it's required to register the TcpConfig.register() the TCP/TLS configuration module or to provide it when using the Configuration(ModuleDefinitionsProvider... providers)
.
For more advanced configuration options take a look at the definitions of TcpConfig.
The project also includes the project files for Eclipse. Make sure to have the following before importing the Californium (Cf) project:
- Eclipse EGit
- m2e - Maven Integration for Eclipse
- UTF-8 workspace text file encoding (Preferences » General » Workspace)
Then choose [Import... » Git » Projects from Git » Local] to import Californium's parent module and all sub-modules into Eclipse.
- RFC 8323 - CoAP (Constrained Application Protocol) over TCP, TLS, and WebSockets (Experimental, not complete, not compliant to the final RFC. Help welcome :-).)