Skip to content

Clean up: Relocate Method to HTTP server#1049

Merged
gittiver merged 4 commits into
CrowCpp:masterfrom
EmBachlitzanakis:master
Jun 15, 2025
Merged

Clean up: Relocate Method to HTTP server#1049
gittiver merged 4 commits into
CrowCpp:masterfrom
EmBachlitzanakis:master

Conversation

@EmBachlitzanakis
Copy link
Copy Markdown
Contributor

This PR addresses the Todo comment :
// TODO(EDev): Move these 6 lines to a method in http_server.

@EmBachlitzanakis EmBachlitzanakis changed the title Clean up: Relocate HTTP server configuration Clean up: Relocate Method to HTTP server Jun 10, 2025
Copy link
Copy Markdown
Member

@gittiver gittiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I would prefer to have the function in app and app.h, as also the other functions related to web sockets are there and the only usage too.
Would spare also the function argument.

@EmBachlitzanakis
Copy link
Copy Markdown
Contributor Author

EmBachlitzanakis commented Jun 11, 2025

I just did what the TODO said wanting to contribute. Honestly though I think it looks prettier and logical more concise as the logic is related to http server functionality

@EmBachlitzanakis
Copy link
Copy Markdown
Contributor Author

EmBachlitzanakis commented Jun 11, 2025

if you want I could also move add_websocket and remove_websocket also in htttp_server?
if not then I will do it your way

@gittiver
Copy link
Copy Markdown
Member

I just did what the TODO said wanting to contribute. Honestly though I think it looks prettier and logical more concise as the logic is related to http server functionality

I agree, but then we have to move the web sockets list and the other function also to http_server.
The smallest possible change would be for now just adding the method to the app.
If you want to spent the effort, move everything web socket related to server.

@EmBachlitzanakis
Copy link
Copy Markdown
Contributor Author

I agree, but then we have to move the web sockets list and the other function also to http_server.
The smallest possible change would be for now just adding the method to the app.
If you want to spent the effort, move everything web socket related to server.

ok i followed your request and i will start to analyze the classes that will affected and how to move the logic of websockets to http_server

Comment thread include/crow/app.h Outdated
Comment thread include/crow/app.h Outdated
@gittiver gittiver merged commit 5d16380 into CrowCpp:master Jun 15, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants