mwhicks-dev / splat-alpha

2D platforming game engine based in C++ and built on top of the SFML multimedia suite.
0 stars 0 forks source link

Implement Request and Response headers #39

Closed mwhicks-dev closed 5 months ago

mwhicks-dev commented 5 months ago

Lightweight headers used for general-purpose encoding. Sometimes, something that is not an event needs to be returned by the server; that is what this is for. Pub/sub channel will always be used for events, but the req/rep channel will have some addn'l handling.

mwhicks-dev commented 5 months ago

Idea: Response has string body and enum content-type with split save/load functions, this way the body can be serialized in-context

mwhicks-dev commented 5 months ago
Request
+ content_type: Request::ContentType
+ body: std::string
Response
+ status: unsigned short
+ content_type: Response::ContentType
+ body: std::string

Having status be a 10-bit int would be OK. Look into later.