def _tune(self, args):
client_heartbeat = self.client_heartbeat or <NUM_LIT:0><EOL>self.channel_max = args.read_short() or self.channel_max<EOL>self.frame_max = args.read_long() or self.frame_max<EOL>self.method_writer.frame_max = self.frame_max<EOL>self.server_heartbeat = args.read_short() or <NUM_LIT:0><EOL>if self.server_heartbeat == <NUM_LIT:0> or client_heartbeat == <NUM_LIT:0>:<EOL><INDENT>self.heartbeat = max(self.server_heartbeat, client_heartbeat)<EOL><DEDENT>else:<EOL><INDENT>self.heartbeat = min(self.server_heartbeat, client_heartbeat)<EOL><DEDENT>if not self.client_heartbeat:<EOL><INDENT>self.heartbeat = <NUM_LIT:0><EOL><DEDENT>self._x_tune_ok(self.channel_max, self.frame_max, self.heartbeat)<EOL>
Propose connection tuning parameters

        This method proposes a set of connection configuration values
        to the client.  The client can accept and/or adjust these.

        PARAMETERS:
            channel_max: short

                proposed maximum channels

                The maximum total number of channels that the server
                allows per connection. Zero means that the server does
                not impose a fixed limit, but the number of allowed
                channels may be limited by available server resources.

            frame_max: long

                proposed maximum frame size

                The largest frame size that the server proposes for
                the connection. The client can negotiate a lower
                value.  Zero means that the server does not impose any
                specific limit but may reject very large frames if it
                cannot allocate resources for them.

                RULE:

                    Until the frame-max has been negotiated, both
                    peers MUST accept frames of up to 4096 octets
                    large. The minimum non-zero value for the frame-
                    max field is 4096.

            heartbeat: short

                desired heartbeat delay

                The delay, in seconds, of the connection heartbeat
                that the server wants.  Zero means the server does not
                want a heartbeat.