Documentation
¶
Index ¶
- type Service
- func (s *Service) HashPrivate(req *dpcc.HashPrivateRequest) (*dpcc.HashPrivateResponse, error)
- func (s *Service) HashPublic(req *dpcc.HashPublicRequest) (*dpcc.HashPublicResponse, error)
- func (s *Service) NewProtocol(node *onet.TreeNodeInstance, conf *onet.GenericConfig) (onet.ProtocolInstance, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { *onet.ServiceProcessor // contains filtered or unexported fields }
Service is our template-service
func (*Service) HashPrivate ¶
func (s *Service) HashPrivate(req *dpcc.HashPrivateRequest) (*dpcc.HashPrivateResponse, error)
HashPrivate receives a reuqest of hash private protocol from the client, executes the corresponding protocol and sends the response back to the client
func (*Service) HashPublic ¶
func (s *Service) HashPublic(req *dpcc.HashPublicRequest) (*dpcc.HashPublicResponse, error)
HashPublic receives a request of hash public protocol from the client, executes the correct protocol and sends the response back to the client
func (*Service) NewProtocol ¶
func (s *Service) NewProtocol(node *onet.TreeNodeInstance, conf *onet.GenericConfig) (onet.ProtocolInstance, error)
NewProtocol is called on all nodes of a Tree (except the root, since it is the one starting the protocol) so it's the Service that will be called to generate the PI on all others node. If you use CreateProtocolOnet, this will not be called, as the Onet will instantiate the protocol on its own. If you need more control at the instantiation of the protocol, use CreateProtocolService, and you can give some extra-configuration to your protocol in here.