mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-08 22:58:59 +00:00
add RAW framer for passthrough
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package framer
|
||||
|
||||
type RawFramer struct{}
|
||||
|
||||
func NewRawFramer() *RawFramer {
|
||||
return &RawFramer{}
|
||||
}
|
||||
|
||||
func (rf *RawFramer) Decode(data []byte) [][]byte {
|
||||
return [][]byte{data}
|
||||
}
|
||||
|
||||
func (rf *RawFramer) Encode(data []byte) []byte {
|
||||
return data
|
||||
}
|
||||
|
||||
func (rf *RawFramer) Clear() {
|
||||
// NOTE(jwetzell): no internal state to clear
|
||||
}
|
||||
|
||||
func (rf *RawFramer) Buffer() []byte {
|
||||
return []byte{}
|
||||
}
|
||||
Reference in New Issue
Block a user