1 | // Copyright 2013 SAP AG.
|
2 | //
|
3 | // Licensed under the Apache License, Version 2.0 (the "License");
|
4 | // you may not use this file except in compliance with the License.
|
5 | // You may obtain a copy of the License at
|
6 | //
|
7 | // http: //www.apache.org/licenses/LICENSE-2.0
|
8 | //
|
9 | // Unless required by applicable law or agreed to in writing,
|
10 | // software distributed under the License is distributed on an
|
11 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
12 | // either express or implied. See the License for the specific
|
13 | // language governing permissions and limitations under the License.
|
14 | ;
|
15 |
|
16 | var chromeNet = require('chrome-net');
|
17 |
|
18 | exports.connect = function connect(options, cb) {
|
19 | function connectionListener() {
|
20 | /* jshint validthis:true */
|
21 | this.setNoDelay(true);
|
22 | if (typeof cb === 'function') {
|
23 | cb.apply(this, arguments);
|
24 | }
|
25 | }
|
26 | return chromeNet.connect(options, connectionListener);
|
27 | };
|
28 | exports._connect = chromeNet.connect; |
\ | No newline at end of file |