struct CCL::Web::IWebSocket
Overview
#include <iwebsocket.h> struct IWebSocket: public CCL::IUnknown { // enums enum ReadyState; // methods virtual DECLARE_STRINGID_MEMBER (kOnOpen) const = 0; virtual uint32 CCL_API getBufferedAmount () const = 0; virtual StringRef CCL_API getExtensions () const = 0; virtual StringRef CCL_API getProtocol () const = 0; virtual UrlRef CCL_API getUrl () const = 0; virtual tresult CCL_API open (UrlRef url, VariantRef protocols = 0) = 0; virtual tresult CCL_API close (int code = 0, StringRef reason = nullptr) = 0; virtual tresult CCL_API send (VariantRef data) = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
Methods
virtual DECLARE_STRINGID_MEMBER (kOnOpen) const = 0
< When connection is closed
< When a message is received, args[0]: data (string or memory stream) < When an error occurred < When the readyState property changes Returns the current state [IObject “readyState”].
virtual uint32 CCL_API getBufferedAmount () const = 0
Get number of bytes queued [IObject “bufferedAmount”].
virtual StringRef CCL_API getExtensions () const = 0
Get extensions selected by server [IObject “extensions”].
virtual StringRef CCL_API getProtocol () const = 0
Get sub-protocl selected by server [IObject “protocol”].
virtual UrlRef CCL_API getUrl () const = 0
Get URL passed to open method [IObject “url”].
virtual tresult CCL_API open (UrlRef url, VariantRef protocols = 0) = 0
Open connection.
virtual tresult CCL_API close (int code = 0, StringRef reason = nullptr) = 0
Close connection.
virtual tresult CCL_API send (VariantRef data) = 0
Send data (string or binary).