# File lib/em/protocols/line_and_text.rb, line 95
 95:       def set_binary_mode size = nil
 96:         if @lbp_mode == :lines
 97:           if size == 0
 98:             receive_binary_data("") if respond_to?(:receive_binary_data)
 99:             # Do no more work here. Stay in line mode and keep consuming data.
100:           else
101:             @lbp_binary_limit = size.to_i # (nil will be stored as zero)
102:             if @lbp_binary_limit > 0
103:               raise "Overlength" if @lbp_binary_limit > MaxBinaryLength # arbitrary sanity check
104:               @lbp_binary_buffer = "\0" * @lbp_binary_limit
105:               @lbp_binary_bytes_received = 0
106:             end
107: 
108:             @lbp_mode = :binary
109:             receive_data @lpb_buffer.flush
110:           end
111:         else
112:           raise "invalid operation"
113:         end
114:       end