-
Notifications
You must be signed in to change notification settings - Fork 26
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
Adding auth in socket request #51
Comments
Have you try sending auth token data right after your socket connection was open? |
Thank you for the quick response. Server request to send the auth when starting connection, so it need to send when the connect() method called. Is there any way to do that in current version? |
If your token on header and sent during handshake you can try add your token in options during initialization |
|
Hey @ajinumoto, thanks for the help. Now, I can send my auth but the socket is not connected yet. It's not called the delegate method, so what's wrong here? Here is my code
|
Probably because you set |
I've move the delegate after the NWWebSocket initialization, but the delegate method is not called either
|
All delegate not working really, even the connect and disconnect delegate? If all of delegate are not working, there is something wrong with your code. If you didn't receive message from socket try listen using Btw, i highly recommend you to see |
Server need to receive auth token from client, so it needs to send the auth. Is there any ways to add auth in socket request? Thank you
The text was updated successfully, but these errors were encountered: