googollee/go-socket.io — pull request #36 by Sean-Der (2014-09-08 02:11:45+00:00)
Title: Implemented Acknowledgment Callback

Hi @googollee this is to close/implement issue #35
The official documentation is located [here](https://github.com/Automattic/socket.io/blob/0.9.14/Readme.md#getting-acknowledgements)

Now when an event packet has an ack, you can pass a callback. The following are two working js-client/go-server examples

```javascript
sio.On("first", func(ns *socketio.NameSpace, callback func(...interface{})) {
callback("hello world")
})

socket.emit('second', function() {
console.log(arguments);
});

```

```go
sio.On("second", func(ns *socketio.NameSpace, testArg int, callback func(...interface{})) {
callback(testArg)
})

sio.On("second", func(ns *socketio.NameSpace, testArg int, callback func(...interface{})) {
callback(testArg)
})
```

What would you like to see to have this merged? thanks!