Module: AMQP::Client::FrameBytes Private

Defined in:
lib/amqp/client/frame_bytes.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Generate binary data for different frames Each frame type implemented as a method Having a class for each frame type is more expensive in terms of CPU and memory

Class Method Summary collapse

Class Method Details

.basic_ack(id, delivery_tag, multiple) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/amqp/client/frame_bytes.rb', line 424

def self.basic_ack(id, delivery_tag, multiple)
  frame_size = 2 + 2 + 8 + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    80, # method: ack
    delivery_tag,
    multiple ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> Q> C C")
end

.basic_cancel(id, consumer_tag, no_wait: false) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/amqp/client/frame_bytes.rb', line 397

def self.basic_cancel(id, consumer_tag, no_wait: false)
  frame_size = 2 + 2 + 1 + consumer_tag.bytesize + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    30, # method: cancel
    consumer_tag.bytesize, consumer_tag,
    no_wait ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> Ca* C C")
end

.basic_cancel_ok(id, consumer_tag) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/amqp/client/frame_bytes.rb', line 411

def self.basic_cancel_ok(id, consumer_tag)
  frame_size = 2 + 2 + 1 + consumer_tag.bytesize + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    31, # method: cancel-ok
    consumer_tag.bytesize, consumer_tag,
    206 # frame end
  ].pack("C S> L> S> S> Ca* C")
end

.basic_consume(id, queue, tag, no_ack, exclusive, no_wait, arguments) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/amqp/client/frame_bytes.rb', line 373

def self.basic_consume(id, queue, tag, no_ack, exclusive, no_wait, arguments)
  no_local = false
  bits = 0
  bits |= (1 << 0) if no_local
  bits |= (1 << 1) if no_ack
  bits |= (1 << 2) if exclusive
  bits |= (1 << 3) if no_wait
  tbl = Table.encode(arguments)
  frame_size = 2 + 2 + 2 + 1 + queue.bytesize + 1 + tag.bytesize + 1 + 4 + tbl.bytesize
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    20, # method: consume
    0, # reserved1
    queue.bytesize, queue,
    tag.bytesize, tag,
    bits, # bits
    tbl.bytesize, tbl, # arguments
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* Ca* C L>a* C")
end

.basic_get(id, queue, no_ack) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/amqp/client/frame_bytes.rb', line 317

def self.basic_get(id, queue, no_ack)
  frame_size = 2 + 2 + 2 + 1 + queue.bytesize + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    70, # method: get
    0, # reserved1
    queue.bytesize, queue,
    no_ack ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* C C")
end

.basic_nack(id, delivery_tag, multiple, requeue) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# File 'lib/amqp/client/frame_bytes.rb', line 438

def self.basic_nack(id, delivery_tag, multiple, requeue)
  bits = 0
  bits |= (1 << 0) if multiple
  bits |= (1 << 1) if requeue
  frame_size = 2 + 2 + 8 + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    120, # method: nack
    delivery_tag,
    bits,
    206 # frame end
  ].pack("C S> L> S> S> Q> C C")
end

.basic_publish(id, exchange, routing_key, mandatory) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/amqp/client/frame_bytes.rb', line 332

def self.basic_publish(id, exchange, routing_key, mandatory)
  frame_size = 2 + 2 + 2 + 1 + exchange.bytesize + 1 + routing_key.bytesize + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    40, # method: publish
    0, # reserved1
    exchange.bytesize, exchange,
    routing_key.bytesize, routing_key,
    mandatory ? 1 : 0, # bits, mandatory/immediate
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* Ca* C C")
end

.basic_qos(id, prefetch_size, prefetch_count, global) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/amqp/client/frame_bytes.rb', line 469

def self.basic_qos(id, prefetch_size, prefetch_count, global)
  frame_size = 2 + 2 + 4 + 2 + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    10, # method: qos
    prefetch_size,
    prefetch_count,
    global ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> L> S> C C")
end

.basic_recover(id, requeue) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/amqp/client/frame_bytes.rb', line 484

def self.basic_recover(id, requeue)
  frame_size = 2 + 2 + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    110, # method: recover
    requeue ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> C C")
end

.basic_reject(id, delivery_tag, requeue) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'lib/amqp/client/frame_bytes.rb', line 455

def self.basic_reject(id, delivery_tag, requeue)
  frame_size = 2 + 2 + 8 + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    90, # method: reject
    delivery_tag,
    requeue ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> Q> C C")
end

.body(id, body_part) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



363
364
365
366
367
368
369
370
371
# File 'lib/amqp/client/frame_bytes.rb', line 363

def self.body(id, body_part)
  [
    3, # type: body
    id, # channel id
    body_part.bytesize, # frame size
    body_part,
    206 # frame end
  ].pack("C S> L> a* C")
end

.channel_close(id, reason, code) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/amqp/client/frame_bytes.rb', line 110

def self.channel_close(id, reason, code)
  frame_size = 2 + 2 + 2 + 1 + reason.bytesize + 2 + 2
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    20, # class: channel
    40, # method: close
    code,
    reason.bytesize, reason,
    0, # error class id
    0, # error method id
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* S> S> C")
end

.channel_close_ok(id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



126
127
128
129
130
131
132
133
134
135
# File 'lib/amqp/client/frame_bytes.rb', line 126

def self.channel_close_ok(id)
  [
    1, # type: method
    id, # channel id
    4, # frame size
    20, # class: channel
    41, # method: close-ok
    206 # frame end
  ].pack("C S> L> S> S> C")
end

.channel_open(id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



98
99
100
101
102
103
104
105
106
107
108
# File 'lib/amqp/client/frame_bytes.rb', line 98

def self.channel_open(id)
  [
    1, # type: method
    id, # channel id
    5, # frame size
    20, # class: channel
    10, # method: open
    0, # reserved1
    206 # frame end
  ].pack("C S> L> S> S> C C")
end

.confirm_select(id, no_wait) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



497
498
499
500
501
502
503
504
505
506
507
# File 'lib/amqp/client/frame_bytes.rb', line 497

def self.confirm_select(id, no_wait)
  [
    1, # type: method
    id, # channel id
    5, # frame size
    85, # class: confirm
    10, # method: select
    no_wait ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> C C")
end

.connection_close(code, reason) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/amqp/client/frame_bytes.rb', line 57

def self.connection_close(code, reason)
  frame_size = 2 + 2 + 2 + 1 + reason.bytesize + 2 + 2
  [
    1, # type: method
    0, # channel id
    frame_size, # frame size
    10, # class: connection
    50, # method: close
    code,
    reason.bytesize, reason,
    0, # error class id
    0, # error method id
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* S> S> C")
end

.connection_close_okObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



73
74
75
76
77
78
79
80
81
82
# File 'lib/amqp/client/frame_bytes.rb', line 73

def self.connection_close_ok
  [
    1, # type: method
    0, # channel id
    4, # frame size
    10, # class: connection
    51, # method: close-ok
    206 # frame end
  ].pack("C S> L> S> S> C")
end

.connection_open(vhost) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/amqp/client/frame_bytes.rb', line 43

def self.connection_open(vhost)
  [
    1, # type: method
    0, # channel id
    2 + 2 + 1 + vhost.bytesize + 1 + 1, # frame_size
    10, # class: connection
    40, # method: open
    vhost.bytesize, vhost,
    0, # reserved1
    0, # reserved2
    206 # frame end
  ].pack("C S> L> S> S> Ca* CCC")
end

.connection_start_ok(response, properties) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Metrics/ModuleLength



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/amqp/client/frame_bytes.rb', line 13

def self.connection_start_ok(response, properties)
  prop_tbl = Table.encode(properties)
  [
    1, # type: method
    0, # channel id
    2 + 2 + 4 + prop_tbl.bytesize + 6 + 4 + response.bytesize + 1, # frame size
    10, # class id
    11, # method id
    prop_tbl.bytesize, prop_tbl, # client props
    5, "PLAIN", # mechanism
    response.bytesize, response,
    0, "", # locale
    206 # frame end
  ].pack("C S> L> S> S> L>a* Ca* L>a* Ca* C")
end

.connection_tune_ok(channel_max, frame_max, heartbeat) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/amqp/client/frame_bytes.rb', line 29

def self.connection_tune_ok(channel_max, frame_max, heartbeat)
  [
    1, # type: method
    0, # channel id
    12, # frame size
    10, # class: connection
    31, # method: tune-ok
    channel_max,
    frame_max,
    heartbeat,
    206 # frame end
  ].pack("CS>L>S>S>S>L>S>C")
end

.exchange_bind(id, destination, source, binding_key, no_wait, arguments) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/amqp/client/frame_bytes.rb', line 180

def self.exchange_bind(id, destination, source, binding_key, no_wait, arguments)
  tbl = Table.encode(arguments)
  frame_size = 2 + 2 + 2 + 1 + destination.bytesize + 1 + source.bytesize + 1 +
               binding_key.bytesize + 1 + 4 + tbl.bytesize
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    40, # class: exchange
    30, # method: bind
    0, # reserved1
    destination.bytesize, destination,
    source.bytesize, source,
    binding_key.bytesize, binding_key,
    no_wait ? 1 : 0,
    tbl.bytesize, tbl, # arguments
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* Ca* Ca* C L>a* C")
end

.exchange_declare(id, name, type, passive, durable, auto_delete, internal, arguments) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/amqp/client/frame_bytes.rb', line 137

def self.exchange_declare(id, name, type, passive, durable, auto_delete, internal, arguments)
  no_wait = false
  bits = 0
  bits |= (1 << 0) if passive
  bits |= (1 << 1) if durable
  bits |= (1 << 2) if auto_delete
  bits |= (1 << 3) if internal
  bits |= (1 << 4) if no_wait
  tbl = Table.encode(arguments)
  frame_size = 2 + 2 + 2 + 1 + name.bytesize + 1 + type.bytesize + 1 + 4 + tbl.bytesize
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    40, # class: exchange
    10, # method: declare
    0, # reserved1
    name.bytesize, name,
    type.bytesize, type,
    bits,
    tbl.bytesize, tbl, # arguments
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* Ca* C L>a* C")
end

.exchange_delete(id, name, if_unused, no_wait) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/amqp/client/frame_bytes.rb', line 162

def self.exchange_delete(id, name, if_unused, no_wait)
  bits = 0
  bits |= (1 << 0) if if_unused
  bits |= (1 << 1) if no_wait
  frame_size = 2 + 2 + 2 + 1 + name.bytesize + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    40, # class: exchange
    20, # method: delete
    0, # reserved1
    name.bytesize, name,
    bits,
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* C C")
end

.exchange_unbind(id, destination, source, binding_key, no_wait, arguments) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/amqp/client/frame_bytes.rb', line 200

def self.exchange_unbind(id, destination, source, binding_key, no_wait, arguments)
  tbl = Table.encode(arguments)
  frame_size = 2 + 2 + 2 + 1 + destination.bytesize + 1 + source.bytesize + 1 +
               binding_key.bytesize + 1 + 4 + tbl.bytesize
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    40, # class: exchange
    40, # method: unbind
    0, # reserved1
    destination.bytesize, destination,
    source.bytesize, source,
    binding_key.bytesize, binding_key,
    no_wait ? 1 : 0,
    tbl.bytesize, tbl, # arguments
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* Ca* Ca* C L>a* C")
end

.header(id, body_size, properties) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/amqp/client/frame_bytes.rb', line 348

def self.header(id, body_size, properties)
  props = Properties.encode(properties)
  frame_size = 2 + 2 + 8 + props.bytesize
  [
    2, # type: header
    id, # channel id
    frame_size, # frame size
    60, # class: basic
    0, # weight
    body_size,
    props, # properties
    206 # frame end
  ].pack("C S> L> S> S> Q> a* C")
end

.heartbeatObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



545
546
547
548
549
550
551
552
# File 'lib/amqp/client/frame_bytes.rb', line 545

def self.heartbeat
  [
    8, # type: heartbeat
    0, # channel id
    0, # frame size
    206 # frame end
  ].pack("C S> L> C")
end

.queue_bind(id, queue, exchange, binding_key, no_wait, arguments) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/amqp/client/frame_bytes.rb', line 263

def self.queue_bind(id, queue, exchange, binding_key, no_wait, arguments)
  tbl = Table.encode(arguments)
  frame_size = 2 + 2 + 2 + 1 + queue.bytesize + 1 + exchange.bytesize + 1 +
               binding_key.bytesize + 1 + 4 + tbl.bytesize
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    50, # class: queue
    20, # method: bind
    0, # reserved1
    queue.bytesize, queue,
    exchange.bytesize, exchange,
    binding_key.bytesize, binding_key,
    no_wait ? 1 : 0,
    tbl.bytesize, tbl, # arguments
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* Ca* Ca* C L>a* C")
end

.queue_declare(id, name, passive, durable, exclusive, auto_delete, arguments) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/amqp/client/frame_bytes.rb', line 220

def self.queue_declare(id, name, passive, durable, exclusive, auto_delete, arguments)
  no_wait = false
  bits = 0
  bits |= (1 << 0) if passive
  bits |= (1 << 1) if durable
  bits |= (1 << 2) if exclusive
  bits |= (1 << 3) if auto_delete
  bits |= (1 << 4) if no_wait
  tbl = Table.encode(arguments)
  frame_size = 2 + 2 + 2 + 1 + name.bytesize + 1 + 4 + tbl.bytesize
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    50, # class: queue
    10, # method: declare
    0, # reserved1
    name.bytesize, name,
    bits,
    tbl.bytesize, tbl, # arguments
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* C L>a* C")
end

.queue_delete(id, name, if_unused, if_empty, no_wait) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/amqp/client/frame_bytes.rb', line 244

def self.queue_delete(id, name, if_unused, if_empty, no_wait)
  bits = 0
  bits |= (1 << 0) if if_unused
  bits |= (1 << 1) if if_empty
  bits |= (1 << 2) if no_wait
  frame_size = 2 + 2 + 2 + 1 + name.bytesize + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    50, # class: queue
    40, # method: declare
    0, # reserved1
    name.bytesize, name,
    bits,
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* C C")
end

.queue_purge(id, queue, no_wait) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



302
303
304
305
306
307
308
309
310
311
312
313
314
315
# File 'lib/amqp/client/frame_bytes.rb', line 302

def self.queue_purge(id, queue, no_wait)
  frame_size = 2 + 2 + 2 + 1 + queue.bytesize + 1
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    50, # class: queue
    30, # method: purge
    0, # reserved1
    queue.bytesize, queue,
    no_wait ? 1 : 0,
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* C C")
end

.queue_unbind(id, queue, exchange, binding_key, arguments) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/amqp/client/frame_bytes.rb', line 283

def self.queue_unbind(id, queue, exchange, binding_key, arguments)
  tbl = Table.encode(arguments)
  frame_size = 2 + 2 + 2 + 1 + queue.bytesize + 1 + exchange.bytesize + 1 +
               binding_key.bytesize + 4 + tbl.bytesize
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    50, # class: queue
    50, # method: unbind
    0, # reserved1
    queue.bytesize, queue,
    exchange.bytesize, exchange,
    binding_key.bytesize, binding_key,
    tbl.bytesize, tbl, # arguments
    206 # frame end
  ].pack("C S> L> S> S> S> Ca* Ca* Ca* L>a* C")
end

.tx_commit(id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



521
522
523
524
525
526
527
528
529
530
531
# File 'lib/amqp/client/frame_bytes.rb', line 521

def self.tx_commit(id)
  frame_size = 2 + 2
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    90, # class: tx
    20, # method: commit
    206 # frame end
  ].pack("C S> L> S> S> C")
end

.tx_rollback(id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



533
534
535
536
537
538
539
540
541
542
543
# File 'lib/amqp/client/frame_bytes.rb', line 533

def self.tx_rollback(id)
  frame_size = 2 + 2
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    90, # class: tx
    30, # method: rollback
    206 # frame end
  ].pack("C S> L> S> S> C")
end

.tx_select(id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



509
510
511
512
513
514
515
516
517
518
519
# File 'lib/amqp/client/frame_bytes.rb', line 509

def self.tx_select(id)
  frame_size = 2 + 2
  [
    1, # type: method
    id, # channel id
    frame_size, # frame size
    90, # class: tx
    10, # method: select
    206 # frame end
  ].pack("C S> L> S> S> C")
end

.update_secret(secret, reason) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/amqp/client/frame_bytes.rb', line 84

def self.update_secret(secret, reason)
  frame_size = 4 + 4 + secret.bytesize + 1 + reason.bytesize
  [
    1, # type: method
    0, # channel id
    frame_size, # frame size
    10, # class: connection
    70, # method: close-ok
    secret.bytesize, secret,
    reason.bytesize, reason,
    206 # frame end
  ].pack("C S> L> S> S> L>a* Ca* C")
end