func connect(options: SocketOptions,
                 closure: (Connection) throws -> Void) throws {
        try closure(connect(options: options))
    }