object ServerCodec extends PacketCodec
- Alphabetic
- By Inheritance
- ServerCodec
- PacketCodec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final val charsetName: String
The character set used to encode and decode strings.
The character set used to encode and decode strings. Unfortunately, this has not been specified in the OSC standard. We recommend to either restrict characters to 7-bit ascii range or to use UTF-8. The default implementation initially uses UTF-8.
- Definition Classes
- ServerCodec → PacketCodec
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def decode(b: ByteBuffer): Packet
Creates a new packet decoded from the ByteBuffer.
Creates a new packet decoded from the ByteBuffer. This method tries to read a null terminated string at the beginning of the provided buffer. If it equals the bundle identifier, the
decode
ofBundle
is called (which may recursively decode nested bundles), otherwise the one fromMessage
.This method is final. For messages encountered,
decodeMessage
is called, , thus for implementations ofPacketCodec
, it is sufficient to overwritedecodeMessage
.- b
ByteBuffer
pointing right at the beginning of the packet. the buffer's limited should be set appropriately to allow the complete packet to be read. when the method returns, the buffer's position is right after the end of the packet.- returns
new decoded OSC packet
- Definition Classes
- PacketCodec
- Annotations
- @throws(classOf[Exception])
- final def decodeBundle(b: ByteBuffer): Bundle
- Definition Classes
- PacketCodec
- Annotations
- @throws(classOf[Exception])
- def decodeMessage(name: String, b: ByteBuffer): Message
Decodes a message with a given name and buffer holding its arguments.
Decodes a message with a given name and buffer holding its arguments.
Implementations should be careful to catch potential instances of
BufferUnderflowException
or other runtime exception such asIllegalArgumentException
and cast them into instances ofPacketCodec.Exception
, such that the caller can be safe to catch any error by matching againstPacketCodec.Exception
.- name
the name of the message which has already been decoded when this method is called.
- b
the buffer, positioned at the type tags list (beginning with
','
).
- Definition Classes
- ServerCodec → PacketCodec
- def encodeBundle(bndl: Bundle, b: ByteBuffer): Unit
Encodes the given bundle into the provided
ByteBuffer
, beginning at the buffer's current position.Encodes the given bundle into the provided
ByteBuffer
, beginning at the buffer's current position. To write the encoded packet, you will typically callflip()
on the buffer, thenwrite()
on the channel.- b
ByteBuffer
pointing right at the beginning of the osc packet. buffer position will be right after the end of the packet when the method returns.
- Definition Classes
- ServerCodec → PacketCodec
- def encodeMessage(msg: Message, b: ByteBuffer): Unit
Encodes the message onto the given
ByteBuffer
, beginning at the buffer's current position.Encodes the message onto the given
ByteBuffer
, beginning at the buffer's current position. To write the encoded message, you will typically callflip()
on the buffer, thenwrite()
on the channel.- b
ByteBuffer
pointing right at the beginning of the osc packet. buffer position will be right after the end of the message when the method returns.
- Definition Classes
- ServerCodec → PacketCodec
- final def encodedBundleSize(bndl: Bundle): Int
Calculates the byte size of the encoded bundle.
Calculates the byte size of the encoded bundle. This method is final. The size is the sum of the bundle name, its time-tag and the sizes of each bundle element.
For contained messages,
encodedMessageSize
will be called, thus for implementations ofPacketCodec
, it is sufficient to overwriteencodedMessageSize
.- Definition Classes
- PacketCodec
- def encodedMessageSize(msg: Message): Int
Calculates the byte size of the encoded message
Calculates the byte size of the encoded message
- returns
the size of the OSC message in bytes
- Definition Classes
- ServerCodec → PacketCodec
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def printAtom(value: Any, stream: PrintStream, nestCount: Int): Unit
Prints a textual representation of the given atom to the given print stream.
Prints a textual representation of the given atom to the given print stream. Implementations should use the atom encoder suitable for the given value.
- value
the atom to encode
- stream
the stream to print on
- nestCount
should only be used if the printing requires line breaks. Indentation should be 2x nestCount space characters.
- Definition Classes
- ServerCodec → PacketCodec
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated