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

The problem when receiving the messages from the Spring boot. #68

Closed
Gensjava opened this issue Aug 24, 2019 · 3 comments
Closed

The problem when receiving the messages from the Spring boot. #68

Gensjava opened this issue Aug 24, 2019 · 3 comments
Labels

Comments

@Gensjava
Copy link

After signed up with connect but nothing comes up if spring sends with this command (convertAndSendToUser), although an Android client the message comes without problems.

override func stompClientDidConnect(client: StompClientLib!) {
super.stompClientDidConnect(client: client)
socketClient.subscribe(destination: "/user/topic/gps/list-riders")
}

override func stompClient(client: StompClientLib!, didReceiveMessageWithJSONBody jsonBody: AnyObject?, withHeader header: [String : String]?, withDestination destination: String) {
Empty??????
}

@Gensjava
Copy link
Author

I have found a solution, it was not a problem this library.

@WrathChaos
Copy link
Owner

Hello @Gensjava,
I'm glad to hear that you solved your problem. Can you please tell us how could you solve your problem? If someone also has the same problem.

@Gensjava
Copy link
Author

Gensjava commented Aug 27, 2019

I found that I started a double of a web socket, and two names came to the server and there was a confusion. With class Principal, I was able to get a login connection and manage it.
But part of the problem is still there. I do not understand how you can subscribe to two or more addresses I do not use the web socket connection again

var socketClient = StompClientLib()
let url = NSURL(string: "your-socket-url-is-here")!
socketClient.openSocketWithURLRequest(request: NSURLRequest(url: url as URL) delegate: self)

I'd like to have one connection (the WebSocket is connected) and I have about 10 topics in various places in the program and I need to receive messages on this topic. I don't understand how to build a structure.

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

No branches or pull requests

2 participants