Client: Added IsConnected property

This commit is contained in:
Tal Aloni 2022-10-28 14:47:03 +03:00
parent 921b672437
commit 7d07f65f7f
3 changed files with 24 additions and 3 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2017-2021 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved. /* Copyright (C) 2017-2022 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
* *
* You can redistribute this program and/or modify it under the terms of * You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation, * the GNU Lesser Public License as published by the Free Software Foundation,
@ -37,5 +37,10 @@ namespace SMBLibrary.Client
{ {
get; get;
} }
bool IsConnected
{
get;
}
} }
} }

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2014-2021 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved. /* Copyright (C) 2014-2022 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
* *
* You can redistribute this program and/or modify it under the terms of * You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation, * the GNU Lesser Public License as published by the Free Software Foundation,
@ -674,6 +674,14 @@ namespace SMBLibrary.Client
} }
} }
public bool IsConnected
{
get
{
return m_isConnected;
}
}
public static void TrySendMessage(Socket socket, SMB1Message message) public static void TrySendMessage(Socket socket, SMB1Message message)
{ {
SessionMessagePacket packet = new SessionMessagePacket(); SessionMessagePacket packet = new SessionMessagePacket();

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2017-2021 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved. /* Copyright (C) 2017-2022 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
* *
* You can redistribute this program and/or modify it under the terms of * You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation, * the GNU Lesser Public License as published by the Free Software Foundation,
@ -619,6 +619,14 @@ namespace SMBLibrary.Client
} }
} }
public bool IsConnected
{
get
{
return m_isConnected;
}
}
public static void TrySendCommand(Socket socket, SMB2Command request, byte[] encryptionKey) public static void TrySendCommand(Socket socket, SMB2Command request, byte[] encryptionKey)
{ {
SessionMessagePacket packet = new SessionMessagePacket(); SessionMessagePacket packet = new SessionMessagePacket();