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

Socket is disconnected with 1007 code as soon as it connected #31

Closed
manusaxena opened this issue Oct 15, 2018 · 12 comments
Closed

Socket is disconnected with 1007 code as soon as it connected #31

manusaxena opened this issue Oct 15, 2018 · 12 comments
Assignees

Comments

@manusaxena
Copy link

Socket is disconnected with 1007 code as soon as it connected. any pointers to fix ?

@WrathChaos
Copy link
Owner

Can you share some more specific information about that? Can you share a sample code with me so I can reproduce it.

@manusaxena
Copy link
Author

manusaxena commented Oct 15, 2018

let wsURL = "205.147.102.113:8080/{app url}/890/jsbhdjwl/websocket"
let completedWSURL = "ws://(wsURL)"
print("Completed WS URL : (completedWSURL)")
let url = NSURL(string: completedWSURL)!
let dic = ["usuario":"37"]

socketClient.openSocketWithURLRequest(request: NSURLRequest(url: url as URL), delegate: self as StompClientLibDelegate, connectionHeaders: dic)

@manusaxena
Copy link
Author

any pointers, i could apply to make it work.

@manusaxena
Copy link
Author

@WrathChaos , waiting for your input if you have.
Otherwise i will have to look on alternative options because release of product is near. please look and let me know if any pointer

@WrathChaos
Copy link
Owner

@manusaxena Hello, sorry for late response. I'm trying your code right now. Also could not understand what do you mean by any pointers??

@WrathChaos
Copy link
Owner

Hi again @manusaxena,
I reproduced the issue. I believe that this issue should fix on server side. Can you please read and try these ways:
GeniusesOfSymfony/WebSocketBundle#294 (comment)
https://stackoverflow.com/a/50462121/2247055

I've also tested lib with my local and server, it is working right now.

@manusaxena
Copy link
Author

ok. i am not sure because same backend is working for javascript client.

@WrathChaos
Copy link
Owner

@manusaxena, Have you ever chance to try your stomp server on Android?

@manusaxena
Copy link
Author

@WrathChaos no i don't. i was just comparing frames with chrome javascript setup and this library. i found ("/u0000") characters are missed from sending frames.

Pointers means suggestions.

If you have some time, then we can have quick skype session

@manusaxena
Copy link
Author

i got solution.
i need to add \u0000 in stompclient.lib

frameString += "\n\u" + "0000"

but above line is giving error "expected hexadecimal code in braces after unicode escape"
i need to pass frame as "CONNECT\nheart-beat:10000,10000\nusuario:30\naccept-version:1.1,1.0\n\n\u0000" can you help me to attach "\u0000" at end

@WrathChaos
Copy link
Owner

@manusaxena, I believe that "\u0000" is a generated one from chrome or somewhere. You should not send it as a frame.
It should be another solution for that.

@WrathChaos
Copy link
Owner

I believe that you fixed the problem. For now, I just close this issue. If there is still a problem, please re-open the issue and let's find a solution together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants