Sha256: 07d04b5012923d1cf476f9ba8394c7bf4be231e27832b75e25aabcf50672ffde

Contents?: true

Size: 414 Bytes

Versions: 8

Compression:

Stored size: 414 Bytes

Contents

module EventMachine
  module WebSocket
    module Close06
      def close_websocket(code, body)
        if code
          close_data = [code].pack('n')
          close_data << body if body
          send_frame(:close, close_data)
        else
          send_frame(:close, '')
        end
        @state = :closing
        start_close_timeout
      end

      def supports_close_codes?; true; end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
em-websocket-0.5.3 lib/em-websocket/close06.rb
em-websocket-0.5.2 lib/em-websocket/close06.rb
sonixlabs-em-websocket-0.5.1.5 lib/em-websocket/close06.rb
sonixlabs-em-websocket-0.5.1.4 lib/em-websocket/close06.rb
sonixlabs-em-websocket-0.5.1.3 lib/em-websocket/close06.rb
sonixlabs-em-websocket-0.5.1.2 lib/em-websocket/close06.rb
sonixlabs-em-websocket-0.5.1.1 lib/em-websocket/close06.rb
em-websocket-0.5.1 lib/em-websocket/close06.rb