some concepts

 resource
//----------
A resource is something that, once you're done using it, you need to return to the system. If you don't, bad things happen.
In C++ programs, the most commonly used resource is dynamically allocated memory (if you allocate memory and never deallocate it, you've got a memory leak), but memory is only one of many resources you must manage.
Other common resources include file descriptors, mutex locks, fonts and brushes in graphical user interfaces (GUIs), database connections, and network sockets.
Regardless of the resource, it's important that it be released when you're finished with it.
//===========================================================
what's port numbers?
//-----------------------------------
To request for service from a server, an obvious method is designating a server
by it's process ID and a host ID.
However, process IDs are assigned chronologically by process creation time, so the client
can't know in advance the process ID of a particular server process on a host.
To resolve this problem, the client uses a port number to specify a particular service,and
the server process created for that service can use that port number to handle the client's request.
//-----------------------
chronological: [ ˌ krɔnə'lɔdʒikəl ]  arranged according to the order of time.
//=============================
Balance

There are no perfect structure . There are only structure that try to balance the current cost and benefit.
Pattern is something that comes with both costs and benefits.You should find yourself using the ones that best fit the problem at hand.  -----《Agile Software Development》

 

發佈了27 篇原創文章 · 獲贊 0 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章