@return {Connection}
(address, protocolVersion, options, writeQueue)
| 279 | |
| 280 | /** @return {Connection} */ |
| 281 | function newInstance(address, protocolVersion, options, writeQueue){ |
| 282 | address = address || helper.baseOptions.contactPoints[0]; |
| 283 | options = utils.deepExtend({ logEmitter: helper.noop }, defaultOptions, options); |
| 284 | const c = new Connection(address + ':' + 9000, protocolVersion || 1, options); |
| 285 | c.connected = !!writeQueue; |
| 286 | c.writeQueue = writeQueue; |
| 287 | return c; |
| 288 | } |
| 289 | |
| 290 | function getWriteQueueFake(sent) { |
| 291 | sent = sent || []; |