You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: amazon_ssm.rb
    path of file: ./repos/metasploit-framework/lib/rex/proto/http/web_socket
    
    the code of the file until where you have to start completion: # -*- coding: binary -*-

requ
    
      def on_data_write(data)
        start_publication if not @publication
        frame = SsmFrame.create(data)
        frame.header.sequence_number = @out_seq_num
        @out_seq_num += 1
        frame.to_binary_s
      end