Closed plicease closed 11 years ago
If anything else is passed in it should be compatible with the current implementation, so $_[0] should be the decoded message.
I was thinking about that, too.
I tried implementing new methods on_next_data() and on_each_data() to do a bit rawer handling of received data. Checkout https://github.com/debug-ito/AnyEvent-WebSocket-Client/tree/connection_raw_data
In on_{next,each}_data() callbacks,
But yeah, passing the connection object is a good idea (it reduces the risk of cyclic reference)
I took what you did and reworked the interface, take a look at my issue_8 branch.
Does this interface meet your needs? I haven't committed to it yet, but I think it is close to what I am thinking.
Yes, it meets my needs. I like the idea of on() method. Thank you!
Cool. Your test was really helped out thanks for that
Possible things that might be of use