/// <summary> /// Constructor. /// </summary> /// <exception cref="System.ArgumentNullException">the context must not be null.</exception> public CifsServerDecodePacket(CifsServerContext context) { if (context == null) { throw new ArgumentNullException("context"); } this.serverContext = context; }
/// <summary> /// Constructor /// </summary> public CifsServer(NetbiosServerConfig config) { this.context = new CifsServerContext(); if (config == null) { throw new ArgumentNullException("config"); } if (config.LocalNetbiosName == null || config.LocalNetbiosName.Length == 0) { config.LocalNetbiosName = this.context.ServerName; } this.context.ServerName = config.LocalNetbiosName; this.context.MaxBufferSize = config.BufferSize; CifsServerDecodePacket decoder = new CifsServerDecodePacket(this.Context); this.transport = new TransportStack(config, decoder.DecodePacketCallback); }