rpc/server_handler.go
crusader b284554280 ing
2017-11-08 15:35:27 +09:00

23 lines
469 B
Go

package rpc
import (
"io"
"git.loafle.net/commons_go/rpc/protocol"
)
type ServerHandler interface {
RegisterCodec(codec protocol.ServerCodec, contentType string)
OnPreRead(r io.Reader)
OnPostRead(r io.Reader)
OnPreWriteResult(w io.Writer, result interface{})
OnPostWriteResult(w io.Writer, result interface{})
OnPreWriteError(w io.Writer, err error)
OnPostWriteError(w io.Writer, err error)
GetCodec(contentType string) (protocol.ServerCodec, error)
}