About protocols/plugins
index
About protocols/plugins
The possibility to expand TV's server with your own protocol was introduced in version 1.06. This implementation was called 'add-in' and was quite basic and limited. TV's server was always using a TCP/IP connection and every add-in had to respond on every incoming connection on every port TV's server was listening on. Certain protocols (like FTP and SMTP) where unable to implement due some limitations and TV's server didn't provided any services (like data storage, TCP/IP and restore functionality). To avoid all these limitations I decided to restart and rewrite the full project, this time with a good design. TV's server should provide the following functionality:
- every plug-in (a DLL file) should be able to provide one or more protocols;
- unique session number to identify each protocol, service and connection;
- separated data storage for every session;
- store saved data on disk and restore data and services on restart;
- an interface to set (control panel) options providing different types of options (like string, integer, list, etc) for each protocol and or service;
- an interface to load new protocols and create new services;
- an interface to retrieve (control panel) options from a specific protocol.
To be able to know which protocols are able to work together it was necessary to define three different types:
- Receiver This protocol needs to establish connections with clients and send and receive data on request. Examples of well known protocols are TCP/IP and Bluetooth protocol;
- Manipulator This protocol will be able to change all the transferred data between a receiver and a laborer protocol. Examples of well known protocols are TLS/SSL;
- Laborer This protocol will process the clients request by receiving and sending data through the manipulator and receiver protocol. Examples of well known protocols are HTTP, FTP, SMTP.