Options for client should optional

like the readme example

fixes #14
This commit is contained in:
Josef Fröhle
2016-06-22 22:18:36 +02:00
parent d5dbd74af2
commit 60cd78255f
+5
View File
@@ -94,6 +94,11 @@ function clientSession(sock, options) {
* @param func callback(err, session)
*/
function client(options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
var sock = new net.Socket();
// Set default options