Skip to content

socket client without neverending loop #2

Closed

Description

@bashilbers

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

Activity

  1. cboden commented on May 30, 2014

    @cboden
    Contributor

    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();
    });
  2. bashilbers commented on Jun 4, 2014

    @bashilbers
    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..

  3. clue commented on Jun 11, 2014

    @clue
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions