@asyncio.coroutine<EOL><INDENT>def _process_msg(self, sid, subject, reply, data):<DEDENT>
payload_size = len(data)<EOL>self.stats['<STR_LIT>'] += <NUM_LIT:1><EOL>self.stats['<STR_LIT>'] += payload_size<EOL>sub = self._subs.get(sid)<EOL>if sub is None:<EOL><INDENT>return<EOL><DEDENT>sub.received += <NUM_LIT:1><EOL>if sub.max_msgs > <NUM_LIT:0> and sub.received >= sub.max_msgs:<EOL><INDENT>self._subs.pop(sid, None)<EOL><DEDENT>msg = self._build_message(subject, reply, data)<EOL>if sub.future is not None:<EOL><INDENT>if sub.future.cancelled():<EOL><INDENT>return<EOL><DEDENT>sub.future.set_result(msg)<EOL>return<EOL><DEDENT>try:<EOL><INDENT>sub.pending_size += payload_size<EOL>if sub.pending_size >= sub.pending_bytes_limit:<EOL><INDENT>sub.pending_size -= payload_size<EOL>if self._error_cb is not None:<EOL><INDENT>yield from self._error_cb(<EOL>ErrSlowConsumer(subject=subject, sid=sid))<EOL><DEDENT>return<EOL><DEDENT>sub.pending_queue.put_nowait(msg)<EOL><DEDENT>except asyncio.QueueFull:<EOL><INDENT>if self._error_cb is not None:<EOL><INDENT>yield from self._error_cb(<EOL>ErrSlowConsumer(subject=subject, sid=sid))<EOL><DEDENT><DEDENT>
Process MSG sent by server.