/// <summary> /// Initializes a new instance of the <see cref="SocketMessage"/> class. /// </summary> public SocketMessage(int type, int length, RequestHandle handle, bool faulted = false) { this.MessageTypeId = type; this.MessageLength = length; this.Handle = handle; this.Faulted = faulted; }
/// <summary> /// Initializes a new instance of the <see cref="SocketMessage"/> class. /// </summary> public SocketMessage(int operation, int length, byte[] data, RequestHandle handle, bool faulted = false) : this(operation, length, handle, faulted) { if (data == null) { throw new ArgumentNullException(nameof(data)); } this.receiveStream = this.CreateStream(); this.receiveStream.Write(data, 0, data.Length); this.receiveStream.Position = 0; }
public FileMessage(int operation, int length, string filename, RequestHandle handle) : base(operation, length, handle) { this.Filename = filename; }
public FileMessage(int operation, int length, RequestHandle handle) : base(operation, length, handle) { this.Filename = Path.GetTempFileName(); }
/// <summary> /// Initializes a new instance of the <see cref="SocketMessage"/> class. /// </summary> public SocketMessage(int operation, int length, Stream stream, RequestHandle handle, bool faulted = false) : this(operation, length, handle, faulted) { this.receiveStream = stream; }