Class ConnectionDataReceivedEventArgs
Event arguments for when data is received.
Inherited Members
Namespace: Swan.Net
Syntax
public class ConnectionDataReceivedEventArgs : EventArgs
Constructors
ConnectionDataReceivedEventArgs(Byte[], ConnectionDataReceivedTrigger, Boolean)
Initializes a new instance of the ConnectionDataReceivedEventArgs class.
Declaration
public ConnectionDataReceivedEventArgs(byte[] buffer, ConnectionDataReceivedTrigger trigger, bool moreAvailable)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[] | buffer | The buffer. |
| ConnectionDataReceivedTrigger | trigger | The trigger. |
| Boolean | moreAvailable | if set to |
Properties
Buffer
Gets the buffer.
Declaration
public byte[] Buffer { get; }
Property Value
| Type | Description |
|---|---|
| Byte[] | The buffer. |
HasMoreAvailable
Gets a value indicating whether the receive buffer has more bytes available.
Declaration
public bool HasMoreAvailable { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
Trigger
Gets the cause as to why this event was thrown.
Declaration
public ConnectionDataReceivedTrigger Trigger { get; }
Property Value
| Type | Description |
|---|---|
| ConnectionDataReceivedTrigger | The trigger. |
Methods
GetStringFromBuffer(Encoding)
Gets the string from buffer.
Declaration
public string GetStringFromBuffer(Encoding encoding)
Parameters
| Type | Name | Description |
|---|---|---|
| Encoding | encoding | The encoding. |
Returns
| Type | Description |
|---|---|
| String | A String that contains the results of decoding the specified sequence of bytes. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | encoding. |