mirror of
https://github.com/yudai/gotty.git
synced 2026-01-09 02:58:50 +01:00
Make client request base64 encoding
This makes gotty-client still work.
This commit is contained in:
parent
1eed97f0f8
commit
dd3603c341
8 changed files with 42 additions and 37 deletions
19
webtty/codecs.go
Normal file
19
webtty/codecs.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package webtty
|
||||
|
||||
type Decoder interface {
|
||||
Decode(dst, src []byte) (int, error)
|
||||
}
|
||||
|
||||
type Encoder interface {
|
||||
Encode(dst, src []byte) (int, error)
|
||||
}
|
||||
|
||||
type NullCodec struct{}
|
||||
|
||||
func (NullCodec) Encode(dst, src []byte) (int, error) {
|
||||
return copy(dst, src), nil
|
||||
}
|
||||
|
||||
func (NullCodec) Decode(dst, src []byte) (int, error) {
|
||||
return copy(dst, src), nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue