Exemplo n.º 1
0
        /// <summary>
        /// Creates a new DeregisterServiceRequest message.
        /// </summary>
        /// <param name="ServiceType">Type of service to unregister.</param>
        /// <returns>DeregisterServiceRequest message that is ready to be sent.</returns>
        public Message CreateDeregisterServiceRequest(ServiceType ServiceType)
        {
            DeregisterServiceRequest deregisterServiceRequest = new DeregisterServiceRequest();

            deregisterServiceRequest.ServiceType = ServiceType;

            Message res = CreateLocalServiceRequest();

            res.Request.LocalService.DeregisterService = deregisterServiceRequest;

            return(res);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Processes DeregisterServiceRequest message from client.
        /// <para>Removes information about the profile server's NodeProfile.</para>
        /// </summary>
        /// <param name="Client">TCP client that sent the request.</param>
        /// <param name="MessageBuilder">Client's message builder.</param>
        /// <param name="RequestMessage">Full request message.</param>
        /// <returns>Response message to be sent to the client.</returns>
        public Message ProcessMessageDeregisterServiceRequest(TcpClient Client, MessageBuilderLocNet MessageBuilder, Message RequestMessage)
        {
            log.Trace("()");

            Message res = MessageBuilder.CreateDeregisterServiceResponse(RequestMessage);

            DeregisterServiceRequest deregisterServiceRequest = RequestMessage.Request.LocalService.DeregisterService;

            profileServerPort = 0;

            log.Trace("(-):*.Response.Status={0}", res.Response.Status);
            return(res);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Processes DeregisterServiceRequest message from client.
        /// <para>Removes information about the profile server's NodeProfile.</para>
        /// </summary>
        /// <param name="Client">TCP client that sent the request.</param>
        /// <param name="MessageBuilder">Client's message builder.</param>
        /// <param name="RequestMessage">Full request message.</param>
        /// <returns>Response message to be sent to the client.</returns>
        public LocProtocolMessage ProcessMessageDeregisterServiceRequest(TcpClient Client, LocMessageBuilder MessageBuilder, LocProtocolMessage RequestMessage)
        {
            log.Trace("()");

            LocProtocolMessage res = MessageBuilder.CreateDeregisterServiceResponse(RequestMessage);

            DeregisterServiceRequest deregisterServiceRequest = RequestMessage.Request.LocalService.DeregisterService;

            profileServer.Uninitialize();

            log.Trace("(-):*.Response.Status={0}", res.Response.Status);
            return(res);
        }