Refactor HTTP::Server to support Universal Port:

These changes are necessary to support the Universal port feature. Synopsis:

* Persist HTTP peer io_service::work lifetime:
This simplification eliminates any potential for bugs caused by incorrect
lifetime management of the io_service::work object.

* Restructure Door to prevent data races, and handle clean exit:
The Server, Door, Door::detector, and Peer objects work together to
correctly implement graceful stop and destructors that block until
all child objects have been destroyed.

Cleanups:
* De-pimpl HTTP::Server
* Rename ServerImpl data members
* Tidy up HTTP::Port interface
This commit is contained in:
Vinnie Falco
2014-10-15 00:41:10 -07:00
parent 2fd139b307
commit dbdf68b248
15 changed files with 699 additions and 764 deletions

View File

@@ -2375,6 +2375,8 @@
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\impl\Peer.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\impl\PlainPeer.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\http\impl\Port.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
@@ -2386,6 +2388,8 @@
</ClCompile>
<ClInclude Include="..\..\src\ripple\http\impl\ServerImpl.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\impl\SSLPeer.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\impl\Types.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\Server.h">

View File

@@ -3381,6 +3381,9 @@
<ClInclude Include="..\..\src\ripple\http\impl\Peer.h">
<Filter>ripple\http\impl</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\impl\PlainPeer.h">
<Filter>ripple\http\impl</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\http\impl\Port.cpp">
<Filter>ripple\http\impl</Filter>
</ClCompile>
@@ -3393,6 +3396,9 @@
<ClInclude Include="..\..\src\ripple\http\impl\ServerImpl.h">
<Filter>ripple\http\impl</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\impl\SSLPeer.h">
<Filter>ripple\http\impl</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\http\impl\Types.h">
<Filter>ripple\http\impl</Filter>
</ClInclude>