summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/em-websocket-0.5.3/lib/em-websocket/close05.rb
blob: 8f8c1508e16d268b5a22a1e363e2c989b062f190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module EventMachine
  module WebSocket
    module Close05
      def close_websocket(code, body)
        # TODO: Ideally send body data and check that it matches in ack
        send_frame(:close, "\x53")
        @state = :closing
        start_close_timeout
      end

      def supports_close_codes?; false; end
    end
  end
end