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

Client opens connection on send - impossible to connect and listen without sending #1

Closed
oaken-source opened this issue Jun 25, 2014 · 6 comments

Comments

@oaken-source
Copy link

the call to Client::connect() is made only in Base::send(), which means you need to send() before you can receive().
Would it maybe be feasible, to add the call to Client::connect() in the Client::__construct() function, which would cause the client to connect immediately?

@fiddur
Copy link
Contributor

fiddur commented Jun 26, 2014

I wanted to make the connecting lazy...

I could add a connect in the receive-method as well. Do you need to be able to connect preemptively as well?

@oaken-source
Copy link
Author

I am not sure.
What I wanted to achieve was a mixed client/server approach, where clients open connections to a server, and then listen on these connections for requests from the server.

fiddur pushed a commit that referenced this issue Jun 30, 2014
@fiddur
Copy link
Contributor

fiddur commented Jun 30, 2014

I tried adding a connect on receive. That would solve the use case of listening directly after instantiation.

@fiddur
Copy link
Contributor

fiddur commented Aug 12, 2014

Have you tried my patch, and did this solve your problem?

@oaken-source
Copy link
Author

Yes, it did. Thanks!

fiddur added a commit that referenced this issue Aug 12, 2014
Connect on receive as well.  Refs #1
@fiddur
Copy link
Contributor

fiddur commented Aug 12, 2014

Fixed in #7.

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

2 participants