We have the base class TCP Server, which provides server functionality. Now we also want to ensure the safe operation of the TCP server. We discussed two approaches.
Pass the value to the TCP server designer, specifying whether it should act as a secure TCPServer or TCP server.
Create a TCPSecure class that inherits from the TCP Server class, for this you will need to override several methods of the base class.
The first approach has advantages that it will retain in one class.
The second approach looks more correct. But we do not expect more types of derivation. So is it worth introducing a new class for this?
Thanks in advance.
, TCPSecure , , - , .
TCPSecure
OO.
, , , ( , 2 , N ), , . , , , . . N , N , , - , ?
, , . . , - Server Secure Insecure ( , ).
: TCPSecure TCPServer, , TCPServer . , , , , , .
, - . . , , . , , -, .
, . , , .
, . , . , , , , , . - , , . , . .
Source: https://habr.com/ru/post/1766008/More articles:When did it become good to use UTF-8? - htmlHow to integrate Sqlite in Visual Studio? - sqliteEclipse memory allocation problem - eclipseOpenRasta returns a list through JsonDataContractCodec - c #How to use the Eclipse RCP command environment Save command with default save action? - eclipse-rcpОбработка соединений ADODB в классическом ASP - vbscriptLoading a module in another module in Joomla - joomlatiffcp.exe merge result file with result file in loop - tiffHow do you maintain the sidebar content of each page in Zotonic? - erlangLINQ 2 SQL query does not work with function call - c #All Articles