diff --git a/README.md b/README.md index 86c58bf..5567325 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,12 @@ will otherwise return false. This method returns the realname (also called gecos) of the connection. +### setTimeout(timeout, [callback]) ### + +As per the implementation socket. See +[Node documentation](http://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback) +for details. + ## Events ## The basic-irc-socket is an event emitter. It emits five events. diff --git a/irc-socket.js b/irc-socket.js index ebbca0e..b4b39da 100644 --- a/irc-socket.js +++ b/irc-socket.js @@ -183,6 +183,10 @@ Socket.prototype = create(events.EventEmitter.prototype, { this.impl.write(message + '\r\n', 'utf-8'); }, + setTimeout: function (timeout, callback) { + this.impl.setTimeout(timeout, callback); + }, + isConnected : function () { return this.connected; },