Refactor code and fix support spring 2.1.x#65
Conversation
Refactor code for the same logic when connect with the socket
| } | ||
| } | ||
|
|
||
| public func openSocketWithURLRequest(request: NSURLRequest, delegate: StompClientLibDelegate) { |
There was a problem hiding this comment.
Actually without header still would be useful. It should stay with overload methods.
There was a problem hiding this comment.
Yup, you right, but I keep the same function with default connectionHeaders properties with null value with one function for the same logic, don't need override. With default connectionHeaders value in function define, you can use with without header or not, like
Without headers with defaults value is null:
socketClient.openSocketWithURLRequest(request: request, delegate: delegate)
With headers:
socketClient.openSocketWithURLRequest(request: request, delegate: delegate, connectionHeaders: headers)
There was a problem hiding this comment.
Awesome answer :) Have you tested it? Does it work with your way? If it is, I will merge it and publish a new version 🎉
There was a problem hiding this comment.
Yup, I have tested it with my project.
There was a problem hiding this comment.
Nice job :) I'm gonna test it and release it soon
|
@baonguyena1 Thank you so much for contribution :) I merged your PR and published a new release. 🎉Release 1.3.7 🎉 |

Refactor code for the same logic when connecting with the socket
Fix connection headers for supporting spring 2.1.x