Server Plug-in

ProPTT2 server has plug-in architectures. Developers can make a plug-in to extend server's features.
Please note the plug-in could have performance issues. Because it will work in a server process.
So all heavy functions would be implemanted by async to avoid the performance issues

Structure

PTTPlugin

This is a interface to plug in a PTT server(package 2.0.0~) and a Link server(package 8.1.0~).

SDK tunneling (package 6.0.0~, SDK4~)

SDK can communicate with Plugin through SDK API and a PTT server's plugin(V4)'s events.
Customer's developers can add their logic in PTT server.

IPTTPlugin

ICallback4 :
void OnClientDirectMessage(String userId, String message)
IPTTPlugin4 :
public void sendToChannel(int channelId, String message)
public void sendToUser(String userStrId, String message)
public void sendToCompanyUsers(int companyId, String message)

ProPTT2 SDK

PTTClient :
int sendMessageToServerPlugin(string message)
void onPublicMessageReceivedFromServerPlugin(string message)
void onPrivateMessageReceivedFromServerPlugin(string message)
PTTChannel :
void onMessageReceivedFromServerPlugin(string message)

Description

1) PTTClient -> PTTPlugin
sendMessageToServerPlugin -> OnClientDirectMessage

2) PTTPlugin -> PTTClient
sendToChannel -> onMessageReceivedFromServerPlugin
sendToUser -> onPrivateMessageReceivedFromServerPlugin
sendToCompanyUsers -> onPublicMessageReceivedFromServerPlugin

IVideoPlugin

This is a interface to plug in Video server(package 2.0.0~).

ITranscoder

This is not supported yet.

IPublicGWPlugin

A developer can make a GW server to link ProPTT2 and their external system through PublicGW Plugin.(package 6.3.0~)

IAdminWebPlugin

This can support user's authentication, 2FA(Two-Factor Authentication) and SSO for customer's legacy.(package 6.3.0~)

ICryptoPlugin

This can support customer's encryption module for more secure communication.(package 8.0.0~)