Add interface for easy protocol implementation

This commit adds a protocol interface to the server, its purpose is to manage TCP connections and the various third-party protocols.

More specifically, ProtoHandleConnection() takes care of exchanging the packets between the local and remote endpoint; the protocol implementation only has to parse them and act accordingly.

The interface knows which protocol is the connection for by calling IsPacketForMe(), a function implemented for each protocol.
This commit is contained in:
Davide Beatrici committed 2019-07-26 08:36:54 +02:00
1 parent 3f9b610c80
commit 7d58e6bf60
10 files changed
+392 -69

No files matched your search

+1 -1
View File
@@ -6412,7 +6412,7 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
{
bool sstp_ret;
// Accept the SSTP connection
c->Type = CONNECTION_TYPE_SSTP;
c->Type = CONNECTION_TYPE_OTHER;
sstp_ret = AcceptSstp(c);