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 to check if connected with server or not ? #3

Open
knight6700 opened this issue Jun 17, 2019 · 7 comments
Open

how to check if connected with server or not ? #3

knight6700 opened this issue Jun 17, 2019 · 7 comments

Comments

@knight6700
Copy link

No description provided.

@anoop4real
Copy link
Owner

Hi,

You can track the connection status in

func stream(_ aStream: Stream, handle eventCode: Stream.Event)

If you want to check in between, then you can add a bool property in SocketDataManager and toggle it based on a stream in closed or not.

@knight6700
Copy link
Author

i want this return Bool to check it in updateLocation

@anoop4real
Copy link
Owner

Hello,
Can you provide some more information on what you are trying to achieve?

@knight6700
Copy link
Author

hello,
I send location when app close and if the internet connection down and connect again the connection with socket refuse must connect again I want to check if not connected or connected

@anoop4real
Copy link
Owner

Just define a bool in SocketDataManager and make SocketDataManageras singleton so that you can access it from anywhere and check its data. Update the bool in every event.

@gyana-techy-ios
Copy link

Hello,
i am Not able to get any message from PacketSender. every time the packet sender state disconnecting.

@anoop4real
Copy link
Owner

@gyanoroprise Packet sender has a quick time out, so please make sure the Persistent TCP box is checked.... check the picture in the ReadMe

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