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

Recieving response multiple times #66

Open
ShoaibHussan1 opened this issue Feb 11, 2016 · 1 comment
Open

Recieving response multiple times #66

ShoaibHussan1 opened this issue Feb 11, 2016 · 1 comment

Comments

@ShoaibHussan1
Copy link

I am listening event in Viewdidload method.each time view did load get called it adds a listener and receiving response incremented by 1.Please tell me its fixture
here is my code
override func viewDidLoad() {
SocketHelper.sharedHelper().theSocket().emit("EventName", args:[jsonInput])
self.listenEventResponse()
}

func listenEventResponse(){
SocketHelper.sharedHelper().theSocket().on("EventName") { (dataArr:[AnyObject]!) -> Void in
let jsonDictionary = (dataArr as NSArray).objectAtIndex(0)
print(jsonDictionary)
// Here i get printed output multiple times each time added once more
}
}

@nhnam
Copy link

nhnam commented Apr 17, 2016

Could I have a look on SocketHelper.sharedHelper() implementation ?

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

2 participants