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

Losing Connect #183

Open
bbabbitt opened this issue Sep 7, 2019 · 4 comments
Open

Losing Connect #183

bbabbitt opened this issue Sep 7, 2019 · 4 comments

Comments

@bbabbitt
Copy link

bbabbitt commented Sep 7, 2019

No description provided.

@bbabbitt
Copy link
Author

bbabbitt commented Sep 7, 2019

I finally figured out how to incorporate the SwiftSocket CocoaPod with my application. I only need a TCP Client, and If I use the Example code I can read data from my TCP Server just fine. However, the example code opens a new connection every time I request data. I need to leave the connection open and read code multiple times later. Every time I call sendRequest() I get a connection closed error message. This seems to be happening because I exit the class containing Socket calls (e.g. "Example Code"). When I go to the TCP Client to send() or read(), fd is clear (0). I am not exactly sure what fd does, but it seems to indicate a connection has been established.

How can I get around this without doing a new connection every time?

@weingenious72
Copy link

@bbabbitt did you found any solution? a have also the same problem.

@MartinKirkby
Copy link

Hello
No it was quicker to move to Streams() class in Swift than trying to fix it.

@weingenious72
Copy link

Okay, thank you

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

3 participants