Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle socket connection on Server #287

Closed
ChintanStratAero opened this issue Mar 15, 2022 · 4 comments
Closed

How to handle socket connection on Server #287

ChintanStratAero opened this issue Mar 15, 2022 · 4 comments
Labels

Comments

@ChintanStratAero
Copy link

I am building Socket TCP Server for laravel .
I want to keep all the connections alive till i don't do connection->close(). But when i do connectionWrite->write ("Hello world") the message is depicted on client screen but connection is also closed. I don't want the connection to die. I want to reuse the connection in future transaction with server. I don't want to close the connection as it does on its own. I am using Postman like Nightingale for testing( as a client).
Question on socket

@SimonFrings
Copy link
Member

Hey @ChintanStratAero, thanks for bringing this up 👍

It looks like what you're seeing is normal HTTP behavior. After the client requests something and the server responds there's no need for the client to leave the connection open. After receiving its answer the client may close the connection.

If you're using postman for testing purposes you're most likely speaking HTTP. You can take a look at https://github.com/reactphp/http, this may help!

@clue clue added the question label Mar 17, 2022
@clue
Copy link
Member

clue commented Mar 17, 2022

I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍

@clue clue closed this as completed Mar 17, 2022
@ChintanStratAero
Copy link
Author

ChintanStratAero commented Mar 18, 2022 via email

@ChintanStratAero
Copy link
Author

ChintanStratAero commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants