| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2011, 2012 Google Inc.  All rights reserved. | 2  * Copyright (C) 2011, 2012 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 121         return ""; | 121         return ""; | 
| 122     String extensions = m_handshake->acceptedExtensions(); | 122     String extensions = m_handshake->acceptedExtensions(); | 
| 123     if (extensions.isNull()) | 123     if (extensions.isNull()) | 
| 124         return ""; | 124         return ""; | 
| 125     return extensions; | 125     return extensions; | 
| 126 } | 126 } | 
| 127 | 127 | 
| 128 WebSocketChannel::SendResult MainThreadWebSocketChannel::send(const String& mess
     age) | 128 WebSocketChannel::SendResult MainThreadWebSocketChannel::send(const String& mess
     age) | 
| 129 { | 129 { | 
| 130     WTF_LOG(Network, "MainThreadWebSocketChannel %p send() Sending String '%s'",
      this, message.utf8().data()); | 130     WTF_LOG(Network, "MainThreadWebSocketChannel %p send() Sending String '%s'",
      this, message.utf8().data()); | 
| 131     CString utf8 = message.utf8(String::StrictConversionReplacingUnpairedSurroga
     tesWithFFFD); | 131     CString utf8 = message.utf8(StrictUTF8ConversionReplacingUnpairedSurrogatesW
     ithFFFD); | 
| 132     enqueueTextFrame(utf8); | 132     enqueueTextFrame(utf8); | 
| 133     processOutgoingFrameQueue(); | 133     processOutgoingFrameQueue(); | 
| 134     // m_channel->send() may happen later, thus it's not always possible to know
      whether | 134     // m_channel->send() may happen later, thus it's not always possible to know
      whether | 
| 135     // the message has been sent to the socket successfully. In this case, we ha
     ve no choice | 135     // the message has been sent to the socket successfully. In this case, we ha
     ve no choice | 
| 136     // but to return SendSuccess. | 136     // but to return SendSuccess. | 
| 137     return WebSocketChannel::SendSuccess; | 137     return WebSocketChannel::SendSuccess; | 
| 138 } | 138 } | 
| 139 | 139 | 
| 140 WebSocketChannel::SendResult MainThreadWebSocketChannel::send(const ArrayBuffer&
      binaryData, unsigned byteOffset, unsigned byteLength) | 140 WebSocketChannel::SendResult MainThreadWebSocketChannel::send(const ArrayBuffer&
      binaryData, unsigned byteOffset, unsigned byteLength) | 
| 141 { | 141 { | 
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 814     } | 814     } | 
| 815 | 815 | 
| 816     Vector<char> frameData; | 816     Vector<char> frameData; | 
| 817     frame.makeFrameData(frameData); | 817     frame.makeFrameData(frameData); | 
| 818 | 818 | 
| 819     m_perMessageDeflate.resetDeflateBuffer(); | 819     m_perMessageDeflate.resetDeflateBuffer(); | 
| 820     return m_handle->send(frameData.data(), frameData.size()); | 820     return m_handle->send(frameData.data(), frameData.size()); | 
| 821 } | 821 } | 
| 822 | 822 | 
| 823 } // namespace WebCore | 823 } // namespace WebCore | 
| OLD | NEW | 
|---|