// ServeCodec calls ServeCodec for the appropriate server // (authenticated or default). func (h *rpcHandler) ServeCodecWithContext(c rpc.ServerCodec, context *proto.Context) { if h.useAuth { AuthenticatedServer.ServeCodecWithContext(c, context) } else { rpc.ServeCodecWithContext(c, context) } }
// ServeConnWithContext is like ServeConn but it allows to pass a // connection context to the RPC methods. func ServeConnWithContext(ctx context.Context, conn io.ReadWriteCloser) { rpc.ServeCodecWithContext(ctx, NewServerCodec(conn)) }
// ServeConnWithContext is like ServeConn but it allows to pass a // connection context to the RPC methods. func ServeConnWithContext(conn io.ReadWriteCloser, context interface{}) { rpc.ServeCodecWithContext(NewServerCodec(conn), context) }