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

UnregisterEndpoints() public method

Remove from the list of endpoints, all endpoints that reference the given socket.
public UnregisterEndpoints ( [ socket ) : void
socket [ the socket to remove all references to
return void
        public void UnregisterEndpoints([NotNull] SocketBase socket)
        {
            lock (m_endpointsSync)
            {
                IList<string> removeList = m_endpoints.Where(e => e.Value.Socket == socket).Select(e => e.Key).ToList();

                foreach (var item in removeList)
                    m_endpoints.Remove(item);
            }
        }

Usage Example

Example #1
0
 protected void UnregisterEndpoints([NotNull] SocketBase socket)
 {
     m_ctx.UnregisterEndpoints(socket);
 }