| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 CloseEventCodePolicyViolation = 1008, | 74 CloseEventCodePolicyViolation = 1008, |
| 75 CloseEventCodeMessageTooBig = 1009, | 75 CloseEventCodeMessageTooBig = 1009, |
| 76 CloseEventCodeMandatoryExt = 1010, | 76 CloseEventCodeMandatoryExt = 1010, |
| 77 CloseEventCodeInternalError = 1011, | 77 CloseEventCodeInternalError = 1011, |
| 78 CloseEventCodeTLSHandshake = 1015, | 78 CloseEventCodeTLSHandshake = 1015, |
| 79 CloseEventCodeMinimumUserDefined = 3000, | 79 CloseEventCodeMinimumUserDefined = 3000, |
| 80 CloseEventCodeMaximumUserDefined = 4999 | 80 CloseEventCodeMaximumUserDefined = 4999 |
| 81 }; | 81 }; |
| 82 | 82 |
| 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. | |
| 85 virtual String extensions() = 0; // Will be available after didConnect() cal
lback is invoked. | |
| 86 virtual SendResult send(const String& message) = 0; | 84 virtual SendResult send(const String& message) = 0; |
| 87 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by
teLength) = 0; | 85 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by
teLength) = 0; |
| 88 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0; | 86 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0; |
| 89 | 87 |
| 90 // For WorkerThreadableWebSocketChannel. | 88 // For WorkerThreadableWebSocketChannel. |
| 91 virtual SendResult send(PassOwnPtr<Vector<char> >) = 0; | 89 virtual SendResult send(PassOwnPtr<Vector<char> >) = 0; |
| 92 | 90 |
| 93 virtual unsigned long bufferedAmount() const = 0; | 91 virtual unsigned long bufferedAmount() const = 0; |
| 94 virtual void close(int code, const String& reason) = 0; | 92 virtual void close(int code, const String& reason) = 0; |
| 95 | 93 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 112 virtual void resume() = 0; | 110 virtual void resume() = 0; |
| 113 | 111 |
| 114 virtual ~WebSocketChannel() { } | 112 virtual ~WebSocketChannel() { } |
| 115 | 113 |
| 116 virtual void trace(Visitor*) { } | 114 virtual void trace(Visitor*) { } |
| 117 }; | 115 }; |
| 118 | 116 |
| 119 } // namespace WebCore | 117 } // namespace WebCore |
| 120 | 118 |
| 121 #endif // WebSocketChannel_h | 119 #endif // WebSocketChannel_h |
| OLD | NEW |