Protocol::WebSocket SourceProtocolWebSocketBinaryFrame

class BinaryFrame

Represents a binary frame that is sent or received by a WebSocket connection.

Definitions

def data?

Signature

returns Boolean

if the frame contains data.

Implementation

def data?
	true
end

def read_message(buffer)

Decode the binary buffer into a suitable binary message.

Signature

parameter buffer String

The binary data to unpack.

Implementation

def read_message(buffer)
	return BinaryMessage.new(buffer)
end

def apply(connection)

Apply this frame to the specified connection.

Implementation

def apply(connection)
	connection.receive_binary(self)
end