Monday, November 08, 2010 at 12:06 AM.

system.verbs.builtins.webserver.sendPartial

on sendPartial (data, adrParamTable, more=true) {
	<<Cross-platform wrapper for send-partial calls.
		<<Saturday, January 10, 1998 at 4:41:26 PM by PBS
	
	local (flFrontierIsServer = false);
	local (flExternalMac = false);
	local (flExternalWin = false);
	
	bundle { //who is the server?
		if inetd.isDaemonRunning (@user.inetd.config.http) {
			if defined (adrParamTable^.port) and adrParamTable^.port == user.inetd.config.http.port {
				flFrontierIsServer = true}};
		if not flFrontierIsServer {
			if system.environment.isMac {
				flExternalMac = true};
			if system.environment.isWindows {
				flExternWin = true}}};
	
	if flFrontierIsServer { //send the data back via tcp verbs
		try {
			tcp.writeStream (adrParamTable^.stream, data)};
		if not more {
			try {
				tcp.closeStream (adrParamTable^.stream)}}};
	
	if flExternalMac { //use the webstar.sendPartial verb to return data
		webstar.sendPartial (data, adrParamTable^.connectionID, more, adrParamTable^.binaryID)};
	
	if flExternalWin { //there are no external Windows servers that support send-partial from Frontier
		scriptError ("Can't send partial data back to the server because this server doesn't support a send-partial event.")};
	
	return (true)}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.