(options: ConnectionOptions, socket: Stream)
| 54 | } |
| 55 | |
| 56 | export function makeConnection(options: ConnectionOptions, socket: Stream): Connection { |
| 57 | let ConnectionType = options.connectionType ?? Connection; |
| 58 | if (options.autoEncrypter) { |
| 59 | ConnectionType = CryptoConnection; |
| 60 | } |
| 61 | |
| 62 | return new ConnectionType(socket, options); |
| 63 | } |
| 64 | |
| 65 | function checkSupportedServer(hello: Document, options: ConnectionOptions) { |
| 66 | const maxWireVersion = Number(hello.maxWireVersion); |
no outgoing calls
no test coverage detected