示例#1
0
        /// <summary>
        /// Synchronously register the id and endpoint with the NameServer.
        /// </summary>
        /// <param name="id">The identifier</param>
        /// <param name="endpoint">The endpoint</param>
        public void Register(string id, IPEndPoint endpoint)
        {
            NameAssignment assignment = new NameAssignment(id, endpoint);

            _client.Send(new NamingRegisterRequest(assignment));
            _registerResponseQueue.Take();
        }
示例#2
0
 public BaseParseObject(Type childType)
 {
     Children     = new DynamicObjectList <T>();
     Assignment   = new NameAssignment();
     Object       = new NameObject();
     _propertyMap = CreatePropertyMap(childType);
 }
示例#3
0
        /// <summary>
        /// Register the identifier and IPEndpoint with the NameServer and send
        /// the response back to the NameClient
        /// </summary>
        /// <param name="value">The register request event</param>
        public override void OnNext(NamingRegisterRequest value)
        {
            NameAssignment assignment = value.NameAssignment;

            _server.Register(assignment.Identifier, assignment.Endpoint);

            value.Link.Write(new NamingRegisterResponse(value));
        }
示例#4
0
 public NamingRegisterRequest(NameAssignment nameAssignment)
 {
     NameAssignment = nameAssignment;
 }