uber-archive / node-statsd-client

Node.js client for statsd
ISC License
28 stars 9 forks source link

add callback function for ephemeralSocket and statsd-client #23

Closed andyxinyuwu closed 9 years ago

andyxinyuwu commented 9 years ago

In order to ensure statsd before server crashes, we can take advantage of socket.send of udp socket. The callback function is called when the messages was sent. I made such changes: Add a callback function field in _writeToSocket in EphemeralSocket.js Add two function to increment immediately in statsd-client.js Thanks.

Raynos commented 9 years ago

reviewers: @Raynos @leizha #summoning

Raynos commented 9 years ago

@andycmu Left review feedback.

andyxinyuwu commented 9 years ago

@Raynos changed codes according to the comments.

andyxinyuwu commented 9 years ago

@Raynos deleted duplicate increment and counter.

Raynos commented 9 years ago

lgtm. Let's cut a new minor version and then publish.