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 can I actually use withAutoConnect(false)? #212

Closed
brett-smith opened this issue May 18, 2023 · 2 comments
Closed

How can I actually use withAutoConnect(false)? #212

brett-smith opened this issue May 18, 2023 · 2 comments

Comments

@brett-smith
Copy link
Contributor

I am trying to make use of DirectConnection, but have hit an issue with reliable synchronization of start up of the client and server parts of the code.

This problem is actually demonstrated by the TestPeer2Peer test, which I believe only actually works more through luck than actually being 100% solid. I intend to raise a separate issue for this, as it may take a little explanation.

Anyway, to work around the problem, I need to use withAutoConnect(). This gives me a DirectConnection with an unconnected transport, but I see no way to then get at the AbstractTransport to call listen() myself (in a new thread).

Is there something in the API I am missing?

@hypfvieh
Copy link
Owner

You are right, the method to connect a not-auto-connected transport is missing.
I updated the current code to include a connect() method which will connect the transport if it wasn't connected before.

@brett-smith
Copy link
Contributor Author

Great, thanks for fast response.

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