<commit_before>module EventMachine
  module Protocols
    class ServerConnection < Connection
      def self.request(host, port, client_side)
        EventMachine.connect(host, port, self) do |c|
          # According to the docs, we will get here AFTER post_init is called.
          c.set_client_side(client_side)
        end
      end

      def set_client_side(conn)
        @client_side = conn
      end

      def receive_data(data)
        # p data
        @client_side.send_data(data)
      end

      def unbind
        @client_side.close_connection_after_writing
      end
    end
  end
end<commit_msg>simpler syntax<commit_after>module EventMachine
  module Protocols
    class ServerConnection < Connection
      def self.request(host, port, client_side)
        EventMachine.connect(host, port, self, client_side)
      end

      def initialize(conn)
        @client_side = conn
      end

      def receive_data(data)
        # p data
        @client_side.send_data(data)
      end

      def unbind
        @client_side.close_connection_after_writing
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.05758683729433273, 'fraction_numerical': 0.0, 'mean_word_length': 2.2784431137724552, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6524125', 'n_tokens_mistral': 323, 'n_tokens_neox': 314, 'n_words': 83}