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

socket client without neverending loop #2

Closed
bashilbers opened this issue May 27, 2014 · 3 comments
Closed

socket client without neverending loop #2

bashilbers opened this issue May 27, 2014 · 3 comments
Labels

Comments

@bashilbers
Copy link

Is there a way to instantiate a pushing client which doesnt care about incoming messages? The current socket client requires a StreamSelectLoop argument..

@cboden cboden added question and removed question labels May 30, 2014
@cboden
Copy link
Contributor

cboden commented May 30, 2014

An EventLoop is required as it does the async writes as well. If you don't want to receive any data from the server you can do the following:

->then(function (React\Stream\Stream $stream) {
    $stream->pause();
});

@bashilbers
Copy link
Author

Ok thanks, but why do I need a DnsResolver? I know my ip address and port of the socket server, isnt that enought?

The createForAddress method will actually never use the DnsResolver instance..

@clue
Copy link
Contributor

clue commented Jun 11, 2014

I've confirmed @cboden's suggestion to work as expected. IMO this is a sensible approach. I assume this solves your question and we can close this ticket? If not, feel free to comment and we can re-open this.

why do I need a DnsResolver?

PR #7 addresses this by making the Resolver optional. Let's try to move this discussion to this PR.

@clue clue closed this as completed Jun 11, 2014
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