@@ 80-92 (lines=13) @@ | ||
77 | ); |
|
78 | } |
|
79 | ||
80 | public function tuneOk(TuneOk $command): Frame |
|
81 | { |
|
82 | return new Frame( |
|
83 | Type::method(), |
|
84 | new Channel(0), |
|
85 | Methods::get('connection.tune-ok'), |
|
86 | new UnsignedShortInteger(new Integer($command->maxChannels())), |
|
87 | new UnsignedLongInteger(new Integer($command->maxFrameSize())), |
|
88 | new UnsignedShortInteger(new Integer( |
|
89 | (int) ($command->heartbeat()->milliseconds() / 1000) |
|
90 | )) |
|
91 | ); |
|
92 | } |
|
93 | ||
94 | public function open(Open $command): Frame |
|
95 | { |
@@ 45-56 (lines=12) @@ | ||
42 | ); |
|
43 | } |
|
44 | ||
45 | public function delete(FrameChannel $channel, Deletion $command): Frame |
|
46 | { |
|
47 | return new Frame( |
|
48 | Type::method(), |
|
49 | $channel, |
|
50 | Methods::get('exchange.delete'), |
|
51 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
52 | new ShortString(new Str($command->name())), |
|
53 | new Bits($command->onlyIfUnused()), |
|
54 | new Bits(!$command->shouldWait()) |
|
55 | ); |
|
56 | } |
|
57 | } |
|
58 |
@@ 53-65 (lines=13) @@ | ||
50 | ); |
|
51 | } |
|
52 | ||
53 | public function delete(FrameChannel $channel, Deletion $command): Frame |
|
54 | { |
|
55 | return new Frame( |
|
56 | Type::method(), |
|
57 | $channel, |
|
58 | Methods::get('queue.delete'), |
|
59 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
60 | new ShortString(new Str($command->name())), |
|
61 | new Bits($command->onlyIfUnused()), |
|
62 | new Bits($command->onlyIfEmpty()), |
|
63 | new Bits(!$command->shouldWait()) |
|
64 | ); |
|
65 | } |
|
66 | ||
67 | public function bind(FrameChannel $channel, Binding $command): Frame |
|
68 | { |