In this chapter, you can find useful basic information for PETEP usage.
Terms
There are many different terms used in PETEP:
-
PDU (Protocol Data Unit): units used to transmit data through PETEP.
PDUs always contain operational data (tags, destination, connection, ...) and data bytes,
however, they can also contain any protocol specific data.
-
Direction C2S / S2C: direction in which PDUs go through PETEP.
- C2S: direction from client to server.
- S2C: direction from server to client.
-
Tags: tags are just strings used to distinguish PDUs between each other.
Using tags, you can for example differentiate specific message and then perform some operation on it.
-
Proxy: element that handles communication protocol.
-
Interceptor: element that processes PDUs (changes content, adds tags, ...).
-
Module: internal / external module that adds some functionality to PETEP.
- Proxy module: adds communication protocol to PETEP (TCP, UDP, ...).
- Interceptor module: adds options for PDU processing.
Projects
Projects are distinguished by their project folder, which only contains configuration directory "conf" by default.
Project configuration
Each project contains the following configuration files in JSON format:
-
project.json: basic configuration that contains project name and description.
-
extensions.json: contains list of used extensions and their configuration / storage.
-
proxies.json: configuration of user defined proxy instances.
-
interceptors-C2S.json: configuration of user defined interceptor instances in direction C2S (Client -> Server).
-
interceptors-S2C.json: configuration of user defined interceptor instances in direction S2C (Client <- Server).
Extensions
PETEP's main feature is its modularity and extensibility. That is why PETEP is divided into modules, which are connected to core. These modules are registered to PETEP through extensions.
If you want to use internal / external extension, you have to add it to the project before you open it. (This can be done using wizard or by manually editing configuration.)
For list of available extensions, please, go to Introduction chapter.
Interceptors
As I have already described above, interceptors are made to work with PDUs in various ways (modification, tagging, dropping, ...).
There are two interceptor queues (one for each direction: C2S between client and server; S2C between server and client). It is completely up to you, what interceptors will you add to these queues and in what order.