-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathHttpTokenizer.h
More file actions
36 lines (31 loc) · 838 Bytes
/
HttpTokenizer.h
File metadata and controls
36 lines (31 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include "Stdafx.h"
#include "ProtocolTokenizer.h"
/*!
* Implements a lightweight HTTP protocol parser to be used for extraction of server names and version numbers.
*/
class HttpTokenizer : public ProtocolTokenizer
{
public:
/*!
* Determines whether the specified service banner can be tokenized using this
* instance of the protocol parser.
*
* \param banner Service banner.
*
* \return Value indicating ability to process.
*/
bool CanTokenize(const std::string& banner) override;
/*!
* Processes the specified service banner.
*
* \param banner Service banner.
*
* \return Extracted tokens.
*/
std::vector<std::string> Tokenize(const std::string& banner) override;
/*!
* Frees up the resources allocated during the lifetime of this instance.
*/
~HttpTokenizer() override;
};