Add a new :class:`RTCIceCandidate` received from the remote peer.

        The specified candidate must have a value for either `sdpMid` or `sdpMLineIndex`.
347392
def addIceCandidate(self, candidate):
        
        if candidate.sdpMid is None and candidate.sdpMLineIndex is None:
            raise ValueError('Candidate must have either sdpMid or sdpMLineIndex')

        for transceiver in self.__transceivers:
            if candidate.sdpMid == transceiver.mid and not transceiver._bundled:
                iceTransport = transceiver._transport.transport
                iceTransport.addRemoteCandidate(candidate)
                return

        if self.__sctp and candidate.sdpMid == self.__sctp.mid and not self.__sctp._bundled:
            iceTransport = self.__sctp.transport.transport
            iceTransport.addRemoteCandidate(candidate)
1302291
@SuppressWarnings("unchecked")
    @Override
    public void addStreamListener(final StreamListener<? extends Packet> listener) {

        try {
            final Method method = listener.getClass().getMethod("endStream", Stream.class);
            final ParameterizedType parameterizedType = (ParameterizedType) method.getGenericParameterTypes()[0];
            final Type[] parameterArgTypes = parameterizedType.getActualTypeArguments();

            // TODO: could actually be more.
            final Type parameterArgType = parameterArgTypes[0];
            final Class<?> parameterArgClass = (Class<?>) parameterArgType;
            if (parameterArgClass.equals(SipPacket.class)) {
                if (this.sipStreamHandler == null) {
                    this.sipStreamHandler = new SipStreamHandler(this.framerManager);
                }
                this.sipStreamHandler.addListener((StreamListener<SipPacket>) listener);
            } else if (parameterArgClass.equals(RtpPacket.class)) {
                if (this.rtpStreamHandler == null) {
                    this.rtpStreamHandler = new RtpStreamHandler(this.framerManager);
                }
                this.rtpStreamHandler.addListener((StreamListener<RtpPacket>) listener);
            }

        } catch (final ArrayIndexOutOfBoundsException e) {
            throw new RuntimeException("Unable to figure out the paramterized type", e);
        } catch (final SecurityException e) {
            throw new RuntimeException("Unable to access method information due to security constraints", e);
        } catch (final NoSuchMethodException e) {
            throw new RuntimeException("The startStream method doesn't exist. Signature changed?", e);
        } catch (final ClassCastException e) {
            // means that the user had not parameterized the StreamListener
            // interface, which means that we cannot actually detect streams.
            throw new IllegalArgumentException("The supplied listener has not been parameterized");
        }
    }
791969
@Override
	public void addInputChannel(RemoteInputChannel listener) throws IOException {
		checkError();

		inputChannels.putIfAbsent(listener.getInputChannelId(), listener);
	}
318805
def add(self, uri, c):
        

        if c.get("parent") is not None:
            ref = self.get(c["parent"])
            if ref.get("parent") is not None:
                c["parent"] = ref["parent"]

        self.db.execute([
            'INSERT INTO comments (',
            '    tid, parent,'
            '    created, modified, mode, remote_addr,',
            '    text, author, email, website, voters, notification)',
            'SELECT',
            '    threads.id, ?,',
            '    ?, ?, ?, ?,',
            '    ?, ?, ?, ?, ?, ?',
            'FROM threads WHERE threads.uri = ?;'], (
            c.get('parent'),
            c.get('created') or time.time(), None, c["mode"], c['remote_addr'],
            c['text'], c.get('author'), c.get('email'), c.get('website'), buffer(
                Bloomfilter(iterable=[c['remote_addr']]).array), c.get('notification'),
            uri)
        )

        return dict(zip(Comments.fields, self.db.execute(
            'SELECT *, MAX(c.id) FROM comments AS c INNER JOIN threads ON threads.uri = ?',
            (uri, )).fetchone()))
405255
public void addRMC( RMCSentence rmc ) {
        try {
            if (rmc.isValid()) {
                date = rmc.getDate();
                time = rmc.getTime();
//            correctedCourse = rmc.getCorrectedCourse();
                faaMode = rmc.getMode();
                position = rmc.getPosition();
                dataStatus = rmc.getStatus();
                kmHSpeed = rmc.getSpeed();
                fieldCount = rmc.getFieldCount();
            }
        } catch (Exception e) {
            // ignore it, this should be handled in the isValid,
            // if an exception is thrown, we can't deal with it here.
        }
    }
832328
def new_connection(self, remote_ip, remote_port):
        
        self.state.set_state('new')
        self._message = Message(Peer(remote_ip, remote_port))

        decision, response_sent = self.is_allowed('accept_new_connection',
                                                  self._message.peer)
        if decision:
            if not response_sent:
                self.handle_input('greet')
            self._set_size_restrictions()
        else:
            if not response_sent:
                self.reply(554, 'SMTP service not available')
            self.close_connection()
211385
def set_trace(host=None, port=None, patch_stdstreams=False):
    
    if host is None:
        host = os.environ.get('REMOTE_PDB_HOST', '127.0.0.1')
    if port is None:
        port = int(os.environ.get('REMOTE_PDB_PORT', '0'))
    rdb = RemotePdb(host=host, port=port, patch_stdstreams=patch_stdstreams)
    rdb.set_trace(frame=sys._getframe().f_back)
1277827
private void scheduleRtcp(long timestamp, RtcpPacketType packetType) {
        // Create the task and schedule it
        long interval = resolveInterval(timestamp);
        this.scheduledTask = new TxTask(packetType);

        try {
            this.reportTaskFuture = this.scheduler.schedule(this.scheduledTask, interval, TimeUnit.MILLISECONDS);
            // Let the RTP handler know what is the type of scheduled packet
            this.statistics.setRtcpPacketType(packetType);
        } catch (IllegalStateException e) {
            logger.warn("RTCP timer already canceled. No more reports will be scheduled.");
        }
    }
420873
private void setProtocolIdentifier(final String identifier)
    {
        logger.info("Connected via " + identifier);

        // NOTE: value is AMI_VERSION, defined in include/asterisk/manager.h

        if (
        // Asterisk 13
        !"Asterisk Call Manager/2.6.0".equals(identifier)

                // Asterisk 13.2
                && !"Asterisk Call Manager/2.7.0".equals(identifier)

                // Asterisk > 13.5
                && !"Asterisk Call Manager/2.8.0".equals(identifier)

                // Asterisk > 13.13
                && !"Asterisk Call Manager/2.9.0".equals(identifier)

                // Asterisk =14.3.0
                && !"Asterisk Call Manager/3.1.0".equals(identifier)

                // since Asterisk 14.4.0
                && !"Asterisk Call Manager/3.2.0".equals(identifier)

                // since Asterisk 15
                && !"Asterisk Call Manager/4.0.0".equals(identifier)

                // since Asterisk 15.1
                && !"Asterisk Call Manager/4.0.1".equals(identifier)

                // since Asterisk 15.2
                && !"Asterisk Call Manager/4.0.2".equals(identifier)

                // since Asterisk 15.3
                && !"Asterisk Call Manager/4.0.3".equals(identifier)

                // Asterisk 16
                && !"Asterisk Call Manager/5.0.0".equals(identifier)

                && !"OpenPBX Call Manager/1.0".equals(identifier) && !"CallWeaver Call Manager/1.0".equals(identifier)
                && !(identifier != null && identifier.startsWith("Asterisk Call Manager Proxy/")))
        {
            logger.warn("Unsupported protocol version '" + identifier + "'. Use at your own risk.");
        }

        protocolIdentifier.setValue(identifier);
        protocolIdentifier.countDown();

    }
1355929
def add_uri_to_queue(self, uri, position=0, as_next=False):
        
        # FIXME: The res.protocol_info should probably represent the mime type
        # etc of the uri. But this seems OK.
        res = [DidlResource(uri=uri, protocol_info="x-rincon-playlist:*:*:*")]
        item = DidlObject(resources=res, title='', parent_id='', item_id='')
        return self.add_to_queue(item, position, as_next)
245539
public static base_response add(nitro_service client, sslcertkey resource) throws Exception {
		sslcertkey addresource = new sslcertkey();
		addresource.certkey = resource.certkey;
		addresource.cert = resource.cert;
		addresource.key = resource.key;
		addresource.password = resource.password;
		addresource.fipskey = resource.fipskey;
		addresource.inform = resource.inform;
		addresource.passplain = resource.passplain;
		addresource.expirymonitor = resource.expirymonitor;
		addresource.notificationperiod = resource.notificationperiod;
		addresource.bundle = resource.bundle;
		return addresource.add_resource(client);
	}
465674
public void addPeer(TrackedPeer peer) {
    this.peers.put(new PeerUID(peer.getAddress(), this.getHexInfoHash()), peer);
  }
938328
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPInstance addCPInstance(CPInstance cpInstance) {
		cpInstance.setNew(true);

		return cpInstancePersistence.update(cpInstance);
	}
829961
public static void setUnsupported(SocketAddress remoteAddress, SessionProtocol protocol) {
        final String key = key(remoteAddress);
        final CacheEntry e = getOrCreate(key);

        if (e.addUnsupported(protocol)) {
            logger.debug("Updated: '{}' does not support {}", key, e);
        }
    }
479578
def add_mapping(agent, prefix, ip):
    """"""
    return _broadcast(agent, AddMappingManager, RecordType.record_A,
                      prefix, ip)
1206998
private void addRtpMapAttribute(Text attribute) throws IllegalArgumentException {
    	if (!attribute.startsWith(SessionDescription.RTPMAP)) {
    		throw new IllegalArgumentException("Not a valid RTP MAP attribute"+attribute);
    	}

    	Iterator<Text> it = attribute.split(':').iterator();
    	Text token = it.next();
    	
        token = it.next();
        token.trim();

        //payload and format descriptor
        it = token.split(' ').iterator();

        //payload
        token = it.next();
        token.trim();

        int payload = token.toInteger();

        //format descriptor
        token = it.next();
        token.trim();

        createFormat(payload, token);
    }
48317
def addTransceiver(self, trackOrKind, direction='sendrecv'):
        
        self.__assertNotClosed()

        # determine track or kind
        if hasattr(trackOrKind, 'kind'):
            kind = trackOrKind.kind
            track = trackOrKind
        else:
            kind = trackOrKind
            track = None
        if kind not in ['audio', 'video']:
            raise InternalError('Invalid track kind "%s"' % kind)

        # check direction
        if direction not in sdp.DIRECTIONS:
            raise InternalError('Invalid direction "%s"' % direction)

        # don't add track twice
        if track:
            self.__assertTrackHasNoSender(track)

        return self.__createTransceiver(
            direction=direction,
            kind=kind,
            sender_track=track)