NetMQ.Core.Ctx.FindEndpoint C# (CSharp) Method

FindEndpoint() private method

private FindEndpoint ( [ addr ) : Endpoint
addr [
return Endpoint
        public Endpoint FindEndpoint([NotNull] string addr)
        {
            Debug.Assert(addr != null);

            lock (m_endpointsSync)
            {
                if (!m_endpoints.ContainsKey(addr))
                    throw new EndpointNotFoundException();

                var endpoint = m_endpoints[addr];

                if (endpoint == null)
                    throw new EndpointNotFoundException();

                // Increment the command sequence number of the peer so that it won't
                // get deallocated until "bind" command is issued by the caller.
                // The subsequent 'bind' has to be called with inc_seqnum parameter
                // set to false, so that the seqnum isn't incremented twice.
                endpoint.Socket.IncSeqnum();

                return endpoint;
            }
        }
    }

Usage Example

Example #1
0
 protected Ctx.Endpoint FindEndpoint([NotNull] string addr)
 {
     return(m_ctx.FindEndpoint(addr));
 }