mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-27 12:36:34 -05:00
26 lines
551 B
Go
26 lines
551 B
Go
package protocol
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
type RequestEncoder interface {
|
|
EncodeRequestHeader(*RequestHeader, io.Writer)
|
|
EncodeRequestBody(io.Writer) io.Writer
|
|
}
|
|
|
|
type RequestDecoder interface {
|
|
DecodeRequestHeader(io.Reader) (*RequestHeader, error)
|
|
DecodeRequestBody(io.Reader) io.Reader
|
|
}
|
|
|
|
type ResponseEncoder interface {
|
|
EncodeResponseHeader(*ResponseHeader, io.Writer)
|
|
EncodeResponseBody(io.Writer) io.Writer
|
|
}
|
|
|
|
type ResponseDecoder interface {
|
|
DecodeResponseHeader(io.Reader) (*ResponseHeader, error)
|
|
DecodeResponseBody(io.Reader) io.Reader
|
|
}
|