| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 virtual bool connect(const KURL&, const String& protocol) = 0; | 83 virtual bool connect(const KURL&, const String& protocol) = 0; |
| 84 virtual String subprotocol() = 0; // Will be available after didConnect() ca
llback is invoked. | 84 virtual String subprotocol() = 0; // Will be available after didConnect() ca
llback is invoked. |
| 85 virtual String extensions() = 0; // Will be available after didConnect() cal
lback is invoked. | 85 virtual String extensions() = 0; // Will be available after didConnect() cal
lback is invoked. |
| 86 virtual SendResult send(const String& message) = 0; | 86 virtual SendResult send(const String& message) = 0; |
| 87 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by
teLength) = 0; | 87 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by
teLength) = 0; |
| 88 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0; | 88 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0; |
| 89 | 89 |
| 90 // For WorkerThreadableWebSocketChannel. | 90 // For WorkerThreadableWebSocketChannel. |
| 91 virtual SendResult send(PassOwnPtr<Vector<char> >) = 0; | 91 virtual SendResult send(PassOwnPtr<Vector<char> >) = 0; |
| 92 | 92 |
| 93 virtual unsigned long bufferedAmount() const = 0; | |
| 94 virtual void close(int code, const String& reason) = 0; | 93 virtual void close(int code, const String& reason) = 0; |
| 95 | 94 |
| 96 // Log the reason text and close the connection. Will call didClose(). | 95 // Log the reason text and close the connection. Will call didClose(). |
| 97 // The MessageLevel parameter will be used for the level of the message | 96 // The MessageLevel parameter will be used for the level of the message |
| 98 // shown at the devtool console. | 97 // shown at the devtool console. |
| 99 // sourceURL and lineNumber parameters may be shown with the reason text | 98 // sourceURL and lineNumber parameters may be shown with the reason text |
| 100 // at the devtool console. | 99 // at the devtool console. |
| 101 // Even if sourceURL and lineNumber are specified, they may be ignored | 100 // Even if sourceURL and lineNumber are specified, they may be ignored |
| 102 // and the "current" url and the line number in the sense of | 101 // and the "current" url and the line number in the sense of |
| 103 // JavaScript execution may be shown if this method is called in | 102 // JavaScript execution may be shown if this method is called in |
| 104 // a JS execution context. | 103 // a JS execution context. |
| 105 // You can specify String() and 0 for sourceURL and lineNumber | 104 // You can specify String() and 0 for sourceURL and lineNumber |
| 106 // respectively, if you can't / needn't provide the information. | 105 // respectively, if you can't / needn't provide the information. |
| 107 virtual void fail(const String& reason, MessageLevel, const String& sourceUR
L, unsigned lineNumber) = 0; | 106 virtual void fail(const String& reason, MessageLevel, const String& sourceUR
L, unsigned lineNumber) = 0; |
| 108 | 107 |
| 109 virtual void disconnect() = 0; // Will suppress didClose(). | 108 virtual void disconnect() = 0; // Will suppress didClose(). |
| 110 | 109 |
| 111 virtual void suspend() = 0; | 110 virtual void suspend() = 0; |
| 112 virtual void resume() = 0; | 111 virtual void resume() = 0; |
| 113 | 112 |
| 114 virtual ~WebSocketChannel() { } | 113 virtual ~WebSocketChannel() { } |
| 115 | 114 |
| 116 virtual void trace(Visitor*) { } | 115 virtual void trace(Visitor*) { } |
| 117 }; | 116 }; |
| 118 | 117 |
| 119 } // namespace WebCore | 118 } // namespace WebCore |
| 120 | 119 |
| 121 #endif // WebSocketChannel_h | 120 #endif // WebSocketChannel_h |
| OLD | NEW |