HTTP server networking side, also, fix the releasing of channels in driver
This commit is contained in:
@@ -269,6 +269,10 @@ public:
|
||||
//
|
||||
HttpParser();
|
||||
|
||||
// Get the parsed status.
|
||||
//
|
||||
int status() const { return status_; }
|
||||
|
||||
// Store the parsed fields into a lua table.
|
||||
//
|
||||
void store(LuaStack &LS, LuaSlot tab) const;
|
||||
@@ -318,17 +322,19 @@ public:
|
||||
|
||||
using HttpParserVec = eng::vector<HttpParser>;
|
||||
|
||||
// This class associates an HTTP request to an actual communication
|
||||
// channel that is executing that request.
|
||||
|
||||
class HttpClientChannel {
|
||||
// This class is used by LpxServer to store the
|
||||
// incoming and outgoing http channels.
|
||||
//
|
||||
class HttpChannel {
|
||||
public:
|
||||
SharedChannel channel_;
|
||||
int64_t parsed_bytes_;
|
||||
|
||||
HttpClientChannel() : parsed_bytes_(0) {}
|
||||
bool marked_for_deletion() const { return channel_ == nullptr; }
|
||||
HttpChannel() : parsed_bytes_(0) {}
|
||||
};
|
||||
|
||||
using HttpClientChannelMap = eng::map<int64_t, HttpClientChannel>;
|
||||
using HttpChannelMap = eng::map<int64_t, HttpChannel>;
|
||||
using HttpChannelVec = eng::vector<HttpChannel>;
|
||||
|
||||
#endif // HTTP_HPP
|
||||
|
||||
Reference in New Issue
Block a user