Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::HttpConnection Struct Reference

Http connection abstraction holding both the incoming and outgoing messages in an HTTP transaction. More...

#include <HttpConnection.h>

Inheritance diagram for SC::HttpConnection:
SC::HttpConnectionBase SC::HttpStaticConnection< ReadQueue, WriteQueue, HeaderBytes, StreamBytes, 0, HttpConnection > SC::HttpAsyncConnection< ReadQueue, WriteQueue, HeaderBytes, StreamBytes >

Classes

struct  ID
 

Public Member Functions

void reset ()
 Prepare this client for re-use, marking it as Inactive.
 
ID getConnectionID () const
 The ID used to find this client in HttpConnectionsPool.
 
- Public Member Functions inherited from SC::HttpConnectionBase
void setHeaderMemory (Span< char > memory)
 
Span< char > getHeaderMemory () const
 
void reset ()
 

Public Attributes

HttpRequest request
 
HttpResponse response
 
uint32_t requestCount = 0
 Number of requests processed on this connection.
 
- Public Attributes inherited from SC::HttpConnectionBase
ReadableSocketStream readableSocketStream
 
WritableSocketStream writableSocketStream
 
AsyncBuffersPool buffersPool
 
AsyncPipeline pipeline
 
SocketDescriptor socket
 

Protected Types

enum class  State {
  Inactive ,
  Active
}
 

Protected Attributes

State state = State::Inactive
 
ID connectionID
 
- Protected Attributes inherited from SC::HttpConnectionBase
Span< char > headerMemory
 

Friends

struct HttpConnectionsPool
 
struct HttpAsyncServer
 

Additional Inherited Members

- Public Types inherited from SC::HttpConnectionBase
using ReadableSocketStream = AsyncReadableSocketStream<AsyncEventLoop>
 
using WritableSocketStream = AsyncWritableSocketStream<AsyncEventLoop>
 

Detailed Description

Http connection abstraction holding both the incoming and outgoing messages in an HTTP transaction.

Member Function Documentation

◆ getConnectionID()

ID SC::HttpConnection::getConnectionID ( ) const
inline

The ID used to find this client in HttpConnectionsPool.

◆ reset()

void SC::HttpConnection::reset ( )

Prepare this client for re-use, marking it as Inactive.

Member Data Documentation

◆ requestCount

uint32_t SC::HttpConnection::requestCount = 0

Number of requests processed on this connection.


The documentation for this struct was generated from the following file: