1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/common/protocol/encoding.go

26 lines
551 B
Go
Raw Normal View History

2016-02-15 18:42:52 -05:00
package protocol
import (
"io"
)
type RequestEncoder interface {
2016-02-25 15:50:10 -05:00
EncodeRequestHeader(*RequestHeader, io.Writer)
EncodeRequestBody(io.Writer) io.Writer
2016-02-15 18:42:52 -05:00
}
type RequestDecoder interface {
2016-02-26 18:05:53 -05:00
DecodeRequestHeader(io.Reader) (*RequestHeader, error)
2016-02-25 15:50:10 -05:00
DecodeRequestBody(io.Reader) io.Reader
2016-02-15 18:42:52 -05:00
}
type ResponseEncoder interface {
2016-02-25 15:50:10 -05:00
EncodeResponseHeader(*ResponseHeader, io.Writer)
EncodeResponseBody(io.Writer) io.Writer
2016-02-15 18:42:52 -05:00
}
type ResponseDecoder interface {
2016-02-26 18:05:53 -05:00
DecodeResponseHeader(io.Reader) (*ResponseHeader, error)
2016-02-25 15:50:10 -05:00
DecodeResponseBody(io.Reader) io.Reader
2016-02-15 18:42:52 -05:00
}