mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-10 01:34:58 +03:00
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:
@ -1606,6 +1606,9 @@ void InitCedar()
|
||||
|
||||
// Initialize protocol module
|
||||
InitProtocol();
|
||||
|
||||
// Initialize third-party protocol interface
|
||||
ProtoInit();
|
||||
}
|
||||
|
||||
// Free Cedar communication module
|
||||
@ -1616,6 +1619,9 @@ void FreeCedar()
|
||||
return;
|
||||
}
|
||||
|
||||
// Free third-party protocol interface
|
||||
ProtoFree();
|
||||
|
||||
// Free protocol module
|
||||
FreeProtocol();
|
||||
}
|
||||
|
Reference in New Issue
Block a user