Ext.Proxy for Comet techniques does not currently exist and would present a challenging task to implement. The process would involve creating a Sax parser to interpret an incomplete XML document and then developing a proxy that can execute operations as new data is received. While ExtJS is not inherently suited for this functionality, the possibility of creating such a proxy is intriguing. It is important to note that any implemented Ext.Proxy would have unique behavior compared to other proxies, requiring different methods and interfaces.
On a different note, triggering an event when receiving stream chunks is achievable in Gecko and WebKit browsers by attaching a handler to the onreadystate event of XHR. This event will be triggered whenever data is received.
For experimental purposes:
Ext.define('Ext.proxy.StreamEventedAjax',{
extend: 'Ext.proxy.Ajax',
doRequest: function(operation, callback, scope) {
if (Ext.isIE) return null;
// Additional setup for doRequest here, utilizing buildRequest, etc
var me = this,
req = new XMLHttpRequest(),
responseLength = 0,
newText = "";
req.onreadystate = function(e) {
newText = req.responseText.substring(responseLength);
responseLength = req.responseText.length;
operation.fireEvent('datareceived',e,newText);
}
req.open(me.getMethod(request),request.url);
}
});