Add comments.
This commit is contained in:
parent
2c414d1469
commit
d25438bdf0
1 changed files with 4 additions and 0 deletions
|
@ -39,13 +39,17 @@ Curl.user_options =
|
||||||
RAW: 'RAW'
|
RAW: 'RAW'
|
||||||
DEBUG: 'DEBUG'
|
DEBUG: 'DEBUG'
|
||||||
|
|
||||||
|
# on 'data' must be returns the chunk length
|
||||||
Curl::on = (event, callback) ->
|
Curl::on = (event, callback) ->
|
||||||
switch event
|
switch event
|
||||||
when 'data'
|
when 'data'
|
||||||
|
# (Buffer chunk) ->
|
||||||
@on_write = callback
|
@on_write = callback
|
||||||
when 'error'
|
when 'error'
|
||||||
|
# (Error error) ->
|
||||||
@on_error = callback
|
@on_error = callback
|
||||||
when 'end'
|
when 'end'
|
||||||
|
# () ->
|
||||||
@on_end = callback
|
@on_end = callback
|
||||||
else
|
else
|
||||||
throw new Error("invalid event type #{event}")
|
throw new Error("invalid event type #{event}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue