Do a read on a channel.
774213
def _ssh_channel_read(ssh_channel_int, count, is_stderr):
    """"""

    buffer_ = create_string_buffer(count)
    while 1:
        received_bytes = c_ssh_channel_read(ssh_channel_int, 
                                            cast(buffer_, c_void_p), 
                                            c_uint32(count),
                                            c_int(int(is_stderr)))

        if received_bytes == SSH_ERROR:
            ssh_session_int = _ssh_channel_get_session(ssh_channel_int)
            error = ssh_get_error(ssh_session_int)

            raise SshError("Channel read failed: %s" % (error))

        # BUG: We're not using the nonblocking variant, but this can still 
        # return SSH_AGAIN due to that call's broken dependencies.
# TODO: This call might return SSH_AGAIN, even though we should always be 
#       blocking. Reported as bug #115.
        elif received_bytes == SSH_AGAIN:
            continue

        else:
            break

# TODO: Where is the timeout configured for the read?
    return buffer_.raw[0:received_bytes]
425780
async def _subscribe(self, channels, is_mask):
        """"""
        news = []
        for channel in channels:
            key = channel, is_mask
            self._channels.append(key)
            if key in self._plugin._subscriptions:
                self._plugin._subscriptions[key].append(self._queue)
            else:
                self._plugin._subscriptions[key] = [self._queue]
                news.append(channel)
        if news:
            await getattr(self._sub, 'psubscribe' if is_mask else 'subscribe')(news)
919256
def emit(self,rlen=150):
      """"""
      source_tx = self._source.emit()
      source_read = self._cutter.cut(source_tx)
      if self._flip and self.options.rand.random() < 0.5: source_read = source_read.rc()
      srname = self.options.rand.uuid4()
      seqfull = FASTQ('@'+self.options.rand.uuid4()+"\tlong\n"+str(source_read.sequence)+"\n+\n"+'I'*source_read.sequence.length+"\n")
      seqperm1 = seqfull.copy()
      seqperm2 = seqfull.copy()
      for e in self.errors:
        seqperm1 = e.permute(seqperm1)
        seqperm2 = e.permute(seqperm2)
      sleft = seqperm1[0:rlen]
      sleft = FASTQ('@'+sleft.name+"\tleft\n"+sleft.sequence+"\n+\n"+sleft.qual+"\n")
      sright = seqperm2.rc()[0:rlen]
      sright = FASTQ('@'+sright.name+"\tright\n"+sright.sequence+"\n+\n"+sright.qual+"\n")
      emission = TranscriptEmission(source_tx,
             Source(source_read,
                    source_read.slice_sequence(0,rlen),
                    source_read.rc().slice_sequence(0,rlen)),
             Read(seqperm1,
                  sleft,
                  sright
                 ))
      return emission
741551
def focus_cb(self, viewer, tf, name):
        
        if not self.settings.get('channel_follows_focus', False):
            return True

        self.logger.debug("focus %s=%s" % (name, tf))
        if tf:
            if viewer != self.getfocus_viewer():
                self.change_channel(name, raisew=False)

        return True
174397
def read_channels(self, fid):
        """"""
        bones = [[] for i in self.vertices]
        num_channels = 0
        for vertex in self.vertices:
            num_channels = num_channels + len(vertex.meta['channels'])

        lin = self.read_line(fid)
        while lin != ':DEGREES':
            lin = self.read_line(fid)
            if lin == '':
                raise ValueError('Could not find :DEGREES in ' + fid.name)

        counter = 0
        lin = self.read_line(fid)
        while lin:
            parts = lin.split()
            if len(parts)==1:
                frame_no = int(parts[0])
                if frame_no:
                    counter += 1
                    if counter != frame_no:
                        raise ValueError('Unexpected frame number.')
                else:
                    raise ValueError('Single bone name  ...')
            else:
                ind = self.get_index_by_name(parts[0])
                bones[ind].append(np.array([float(channel) for channel in parts[1:]]))
            lin = self.read_line(fid)

        num_frames = counter

        channels = np.zeros((num_frames, num_channels))

        end_val = 0
        for i in range(len(self.vertices)):
            vertex = self.vertices[i]
            if len(vertex.meta['channels'])>0:                
                start_val = end_val
                end_val = end_val + len(vertex.meta['channels'])
                for j in range(num_frames):
                    channels[j, start_val:end_val] = bones[i][j]
            self.resolve_indices(i, start_val)

        self.smooth_angle_channels(channels)
        return channels
4422
def on_rabbitmq_channel_open(self, channel):
        
        LOGGER.info('Channel %i is opened for communication with RabbitMQ',
                    channel.channel_number)
        self._set_rabbitmq_channel(channel)
        self._publish_deferred_messages()
1317990
def kick(self, channel, nick, comment=""):
        """"""
        self.send_items('KICK', channel, nick, comment and ':' + comment)
776618
def publish(self, channel: str, value: Any):
        
        self._r.publish(channel, str(value))
333792
function(channel, subscription, context, once) {
      if (!channels[channel]) channels[channel] = [];
      channels[channel].push({fn: subscription, context: context || this, once: once});
    }
472712
def channels(self, topic):
        """"""
        nsq.assert_valid_topic_name(topic)
        return self._request('GET', '/channels', fields={'topic': topic})
1228489
def open_channel(self):
        
        logger.info('Creating a new channel')
        self._connection.channel(on_open_callback=self.on_channel_open)
892720
def channels_create(self, name, **kwargs):
        """"""
        return self.__call_api_post('channels.create', name=name, kwargs=kwargs)
846488
def _on_open(self, _):
        """"""
        nick = self._format_nick(self._nick, self._pwd)
        data = {"cmd": "join", "channel": self._channel, "nick": nick}
        self._send_packet(data)
        self._thread = True
        threading.Thread(target=self._ping).start()
101090
function() {
		var out = location.toString();
		this._channels.forEach(function(channel) {
			out += "\n" + channel[0] + " : " + channel[1];
		});
		console.log(out + "\n\n");
	}
761942
@Override
  public void probeChannel() {
    if (closed) return;
    
    try {
      final SocketChannel channel = preparedChannel();
      if (channel != null) {
        readConsume(channel);
      }
    } catch (IOException e) {
      logger.log("Failed to read channel selector for " + address + " because: " + e.getMessage(), e);
    }
  }
269780
def sub(self, topic, channel):
        ''''''
        return self.send(' '.join((constants.SUB, topic, channel)))
450904
def channel(self, channel_id=None, auto_encode_decode=True):
        """"""
        try:
            return self.channels[channel_id]
        except KeyError:
            return self.Channel(self, channel_id,
                                auto_encode_decode=auto_encode_decode)