public FunctionalityFindingService()
        {
            this._domainOntologyServiceAddress = new Address(FunctionalityFindingServiceSettings.Default.DOS_IP, FunctionalityFindingServiceSettings.Default.DOS_PORT);

            this._localFunctionalityFindingServiceAddress = new Address(FunctionalityFindingServiceSettings.Default.FFS_IP, FunctionalityFindingServiceSettings.Default.LISTENING_PORT);

            this.services = new Hashtable();

            this.listener = new Listener(new FunctionalityFindingServiceTransformer(this));
        }
Esempio n. 2
0
 /// <param name="domainOntologyServiceAddress">Adresa serviciului de ontologia domeniului</param>
 /// <param name="functionalityFindingServiceAddress">Adresa serviciului de găsire a funcţionalităţii</param>
 public Client(Address domainOntologyServiceAddress, Address functionalityFindingServiceAddress)
 {
     this._domainOntologyServiceAddress = domainOntologyServiceAddress;
     this._functionalityFindingServiceAddress = functionalityFindingServiceAddress;
 }
Esempio n. 3
0
        /// <summary>
        ///   Trimite mesajul către adresa menţionată şi returnează răspunsul.
        /// </summary>
        /// <param name="to">Adresa spre care să trimită mesajul</param>
        /// <returns>Mesajul răspuns primit înapoi</returns>
        public Message deliverAndWaitFeedback(Address to)
        {
            try {

                byte[] stream = this.serialize();

                NetworkStream netStream = new TcpClient(to.ip, to.port).GetStream();

                netStream.Write(stream, 0, stream.Length);

                netStream.Flush();

                Message answer = new Message(netStream);

                netStream.Close();

                return answer;
            }
            catch (Exception) {

                return null;
            }
        }