Sha256: ce15b951b7d7568d7b5afc01a7ae2f6928e4eb6d82ee7647f3c41df1c2fe96e7

Contents?: true

Size: 1.52 KB

Versions: 83

Compression:

Stored size: 1.52 KB

Contents

/*****************************************************************************

$Id$

File:     files.h
Date:     26Aug06

Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
Gmail: blackhedd

This program is free software; you can redistribute it and/or modify
it under the terms of either: 1) the GNU General Public License
as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version; or 2) Ruby's License.

See the file COPYING for complete licensing information.

*****************************************************************************/


#ifndef __FileStreamDescriptor__H_
#define __FileStreamDescriptor__H_



/**************************
class FileStreamDescriptor
**************************/

class FileStreamDescriptor: public EventableDescriptor
{
	public:
		FileStreamDescriptor (int, EventMachine_t*);
		virtual ~FileStreamDescriptor();

		virtual void Read();
		virtual void Write();
		virtual void Heartbeat();

		virtual bool SelectForRead();
		virtual bool SelectForWrite();

		// Do we have any data to write? This is used by ShouldDelete.
		virtual int GetOutboundDataSize() {return OutboundDataSize;}

	protected:
		struct OutboundPage {
			OutboundPage (const char *b, int l, int o=0): Buffer(b), Length(l), Offset(o) {}
			void Free() {if (Buffer) free ((char*)Buffer); }
			const char *Buffer;
			int Length;
			int Offset;
		};

	protected:
		deque<OutboundPage> OutboundPages;
		int OutboundDataSize;

	private:

};


#endif // __FileStreamDescriptor__H_

Version data entries

83 entries across 83 versions & 14 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/eventmachine-0.12.10/ext/files.h
classiccms-0.7.4 vendor/bundle/gems/eventmachine-0.12.10/ext/files.h
classiccms-0.7.3 vendor/bundle/gems/eventmachine-0.12.10/ext/files.h
MattHulse-eventmachine-0.0.1 ext/files.h
MattHulse-eventmachine-0.12.10 ext/files.h
brianmario-eventmachine-0.12.2 ext/files.h
careo-eventmachine-0.12.5.1 ext/files.h
davidsmalley-eventmachine-0.12.3.1 ext/files.h
eventmachine-eventmachine-0.12.3 ext/files.h
eventmachine-eventmachine-0.12.4 ext/files.h
eventmachine-eventmachine-0.12.5 ext/files.h
eventmachine-eventmachine-0.12.6 ext/files.h
eventmachine-eventmachine-0.12.7 ext/files.h
eventmachine-eventmachine-0.12.8 ext/files.h
eventmachine-eventmachine-0.12.9 ext/files.h
libc-eventmachine-0.12.5.42 ext/files.h
libc-eventmachine-0.12.7.42 ext/files.h
classiccms-0.7.2 vendor/bundle/gems/eventmachine-0.12.10/ext/files.h
classiccms-0.7.1 vendor/bundle/gems/eventmachine-0.12.10/ext/files.h
classiccms-0.7.0 vendor/bundle/gems/eventmachine-0.12.10/ext/files.h