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

Timeout for connection to server #41

Closed
CyanoFresh opened this issue Jan 20, 2017 · 6 comments
Closed

Timeout for connection to server #41

CyanoFresh opened this issue Jan 20, 2017 · 6 comments

Comments

@CyanoFresh
Copy link

CyanoFresh commented Jan 20, 2017

Hello. I want to do this: If server does not respond for 2 seconds - cancel connection and return message with error to client. How to do this by this library?

Btw thanks for nice work!

@christopher-francisco
Copy link

bump

@MartinvdBij
Copy link

It does not seem to have an timeout at all ? I also have the need for a timeout, preferably custom defined.

@mbonneau
Copy link
Member

mbonneau commented Oct 3, 2017

@CyanoFresh @chris-fa @MartinvdBij - are you referring to connection timeouts or response timeouts?

@CyanoFresh
Copy link
Author

@mbonneau connection timeout (btw connection consists of response(s))

@CyanoFresh CyanoFresh changed the title How to specify timeout Timeout for connection to server Oct 9, 2017
@mbonneau
Copy link
Member

mbonneau commented Oct 9, 2017

#57 Will allow the use of the TimeoutConnector

@cboden
Copy link
Member

cboden commented Oct 12, 2017

With the release of v0.3 connection timeouts are now possible:

$reactConnector = new \React\Socket\Connector($loop, [
    'timeout' => 2 // (seconds)
]);
$pawlConnector = new Ratchet\Client\Connector($loop, $reactConnector);

@cboden cboden closed this as completed Oct 12, 2017
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

No branches or pull requests

5 participants