Exemplo n.º 1
0
        } // Write

        protected override void Dispose(bool disposing)
        {
            try {
                if (disposing)
                {
                    _port.Dispose();
                }
            }
            finally {
                base.Dispose(disposing);
            }
        }
 public void ReleaseConnection(IpcPort port)
 {
     string name = port.Name;
     PortConnection connection = (PortConnection) _connections[name];
     if (port.Cacheable && ((connection == null) || connection.Port.IsDisposed))
     {
         lock (_connections)
         {
             _connections[name] = new PortConnection(port);
             return;
         }
     }
     port.Dispose();
 }
        public void ReleaseConnection(IpcPort port)
        {
            string         name       = port.Name;
            PortConnection connection = (PortConnection)_connections[name];

            if (port.Cacheable && ((connection == null) || connection.Port.IsDisposed))
            {
                lock (_connections)
                {
                    _connections[name] = new PortConnection(port);
                    return;
                }
            }
            port.Dispose();
        }
Exemplo n.º 4
0
        } // GetSocket

        public void ReleaseConnection(IpcPort port)
        {
            string         portName   = port.Name;
            PortConnection connection = (PortConnection)_connections[portName];

            if (port.Cacheable && (connection == null || connection.Port.IsDisposed))
            {
                lock (_connections)
                {
                    _connections[portName] = new PortConnection(port);
                }
            }
            else
            {
                // there should have been a connection, so let's just close
                //   this socket.
                port.Dispose();
            }
        } // ReleasePort
Exemplo n.º 5
0
 public void StopListening(Object data)
 {
     InternalRemotingServices.RemotingTrace("IpcChannel.StopListening");
     _bListening = false;
     _port.Dispose();
 } // StopListening
Exemplo n.º 6
0
        } // GetSocket

        public void ReleaseConnection(IpcPort port)
        {
            string portName = port.Name;
            PortConnection connection = (PortConnection)_connections[portName];
            if (port.Cacheable && (connection == null || connection.Port.IsDisposed))
            {
                lock(_connections)
                {
                    _connections[portName] = new PortConnection(port);
                }
            }
            else
            {
                // there should have been a connection, so let's just close
                //   this socket.
                port.Dispose();
            }
        } // ReleasePort