Class Message
Represents an OSC message, including its method address and data arguments.
public sealed class Message
- Inheritance
-
Message
- Inherited Members
Constructors
Message(ArraySegment<byte>)
Initializes a new instance of the Message class using the specified array segment.
public Message(ArraySegment<byte> buffer)
Parameters
buffer
ArraySegment<byte>A section of an 8-bit unsigned integer array representing the contents of an OSC message.
Message(byte[])
Initializes a new instance of the Message class using the specified binary payload.
public Message(byte[] array)
Parameters
array
byte[]An 8-bit unsigned integer array representing the contents of an OSC message.
Message(byte[], int, int)
Initializes a new instance of the Message class using the specified array segment.
public Message(byte[] array, int offset, int count)
Parameters
array
byte[]An 8-bit unsigned integer array storing the contents of the OSC message.
offset
intThe zero-based starting position of the OSC message in the array.
count
intThe number of bytes used by the contents of the OSC message.
Properties
Address
Gets the OSC address pattern specifying which method to invoke with the data in this message.
public string Address { get; }
Property Value
Buffer
Gets the an 8-bit unsigned integer array segment representing the contents of this OSC message.
public ArraySegment<byte> Buffer { get; }
Property Value
TypeTag
Gets or sets the OSC type tag specifying the type of the OSC arguments in the message.
public string TypeTag { get; }
Property Value
Methods
GetContentStream()
Opens a memory stream into the OSC message contents.
public Stream GetContentStream()
Returns
- Stream
An instance of the Stream class which can be used to read the binary contents of the OSC message.
GetContents()
Returns an enumerable sequence of the OSC arguments in this message.
public IEnumerable GetContents()
Returns
- IEnumerable
An IEnumerable object which can be used to enumerate all the OSC arguments in this message.
IsMatch(string)
Returns whether the OSC address pattern in this message matches the specified method name.
public bool IsMatch(string methodName)
Parameters
methodName
stringThe name of the OSC method to match against the OSC address pattern of this message.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.