| 84 | private: |
| 85 | /// Client connection state |
| 86 | struct ClientState { |
| 87 | u32 clientId; |
| 88 | bool httpHeaderReceived; |
| 89 | bool httpHeaderSent; |
| 90 | HttpRequestParser requestParser; |
| 91 | fl::vector<u8> pendingData; // Data waiting to be processed |
| 92 | fl::string headerBuffer; // Accumulates partial HTTP header reads |
| 93 | |
| 94 | // Default constructor (required for map operations) |
| 95 | ClientState() FL_NOEXCEPT |
| 96 | : clientId(0) |
| 97 | , httpHeaderReceived(false) |
| 98 | , httpHeaderSent(false) |
| 99 | , requestParser() |
| 100 | , pendingData() |
| 101 | { |
| 102 | } |
| 103 | |
| 104 | ClientState(u32 id) |
| 105 | : clientId(id) |
| 106 | , httpHeaderReceived(false) |
| 107 | , httpHeaderSent(false) |
| 108 | , requestParser() |
| 109 | , pendingData() |
| 110 | { |
| 111 | } |
| 112 | }; |
| 113 | |
| 114 | /// Read and validate HTTP request header from client |
| 115 | /// @param clientId Client ID |
no outgoing calls
no test coverage detected