mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
SMBServer: Added server Start / Stop log events and exception documentation
This commit is contained in:
parent
152f2cdaa0
commit
c93bb66152
1 changed files with 3 additions and 0 deletions
|
@ -57,10 +57,12 @@ namespace SMBLibrary.Server
|
||||||
m_services = new NamedPipeShare(shares.ListShares());
|
m_services = new NamedPipeShare(shares.ListShares());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <exception cref="System.Net.Sockets.SocketException"></exception>
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
if (!m_listening)
|
if (!m_listening)
|
||||||
{
|
{
|
||||||
|
Log(Severity.Information, "Starting server");
|
||||||
m_listening = true;
|
m_listening = true;
|
||||||
|
|
||||||
m_listenerSocket = new Socket(m_serverAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
m_listenerSocket = new Socket(m_serverAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||||
|
@ -73,6 +75,7 @@ namespace SMBLibrary.Server
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
|
Log(Severity.Information, "Stopping server");
|
||||||
m_listening = false;
|
m_listening = false;
|
||||||
SocketUtils.ReleaseSocket(m_listenerSocket);
|
SocketUtils.ReleaseSocket(m_listenerSocket);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue