| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return; | 100 return; |
| 101 | 101 |
| 102 m_state = Suspended; | 102 m_state = Suspended; |
| 103 } | 103 } |
| 104 | 104 |
| 105 void WebSocket::EventQueue::resume() | 105 void WebSocket::EventQueue::resume() |
| 106 { | 106 { |
| 107 if (m_state != Suspended || m_resumeTimer.isActive()) | 107 if (m_state != Suspended || m_resumeTimer.isActive()) |
| 108 return; | 108 return; |
| 109 | 109 |
| 110 m_resumeTimer.startOneShot(0); | 110 m_resumeTimer.startOneShot(0, FROM_HERE); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void WebSocket::EventQueue::stop() | 113 void WebSocket::EventQueue::stop() |
| 114 { | 114 { |
| 115 if (m_state == Stopped) | 115 if (m_state == Stopped) |
| 116 return; | 116 return; |
| 117 | 117 |
| 118 m_state = Stopped; | 118 m_state = Stopped; |
| 119 m_resumeTimer.stop(); | 119 m_resumeTimer.stop(); |
| 120 m_events.clear(); | 120 m_events.clear(); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0
x10000; | 681 static const size_t minimumPayloadSizeWithEightByteExtendedPayloadLength = 0
x10000; |
| 682 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; | 682 size_t overhead = hybiBaseFramingOverhead + hybiMaskingKeyLength; |
| 683 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) | 683 if (payloadSize >= minimumPayloadSizeWithEightByteExtendedPayloadLength) |
| 684 overhead += 8; | 684 overhead += 8; |
| 685 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) | 685 else if (payloadSize >= minimumPayloadSizeWithTwoByteExtendedPayloadLength) |
| 686 overhead += 2; | 686 overhead += 2; |
| 687 return overhead; | 687 return overhead; |
| 688 } | 688 } |
| 689 | 689 |
| 690 } // namespace WebCore | 690 } // namespace WebCore |
| OLD | NEW |