Skip to content

how to know that cifs connection is established or not? #73

@azamsolix

Description

@azamsolix
var SMB2 = require('@marsaud/smb2');
async function m1() {
  // create an SMB2 instance
  var smb2Client = new SMB2({
    share: '***',
        domain: '***',
        username: '**',
        password: '*****',
        autoCloseTimeout:0
  });
  // console.log(smb2Client)
  let ans = await smb2Client;
  console.log('aa',ans)
 smb2Client.readFile('share-apis.txt', function(err, content) {
  if (err) throw err;
  console.log(content.toString());
});
}
m1()  ;

I am getting smbclient object in which connected property is returning false,However,I am able to use smb2client to read file
Output:
cifscapture

SO,I how can i know that connection is established or not.I just want to test the connection whether it is connected successfully or not.
Thanks
Azam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions