Standard input stream. More...
Public Member Functions | |
virtual void | flush () |
Cannot flush stdin. | |
virtual void | notifyEvent (Hub *srv, EvType &t) |
Callback when an event is notified, allowing the stream to rearm it. | |
virtual void | read (void *data, size_t size) |
Reads data from the stream. | |
StdinStream (const std::string ¶ms) | |
Create the stream and associates a file descriptor. | |
virtual void | write (const void *data, const size_t size) |
Cannot write to stdin. | |
~StdinStream () | |
Destructor. | |
Protected Attributes | |
HANDLE | hev |
The real data event handle. | |
HANDLE | hf |
The file handle. |
Standard input stream.
Due to the really weird way Windows manages its consoles, normal overlapped file I/O is utterly useless here.
Definition at line 414 of file dashel-win32.cpp.
Dashel::StdinStream::StdinStream | ( | const std::string & | params | ) | [inline] |
Create the stream and associates a file descriptor.
Definition at line 426 of file dashel-win32.cpp.
Dashel::StdinStream::~StdinStream | ( | ) | [inline] |
Destructor.
Definition at line 445 of file dashel-win32.cpp.
virtual void Dashel::StdinStream::flush | ( | ) | [inline, virtual] |
Callback when an event is notified, allowing the stream to rearm it.
t | Type of event. |
Reimplemented from Dashel::WaitableStream.
Definition at line 453 of file dashel-win32.cpp.
virtual void Dashel::StdinStream::read | ( | void * | data, | |
size_t | size | |||
) | [inline, virtual] |
Reads data from the stream.
Reads all requested data from the stream, blocking until all the data has been read, or some error occurs. Errors are signaled by throwing a DashelException exception, which may be caused either by device errors or reaching the end of file.
data | Pointer to the memory where the read data should be stored. | |
size | Amount of data to read in bytes. |
Implements Dashel::Stream.
Definition at line 484 of file dashel-win32.cpp.
virtual void Dashel::StdinStream::write | ( | const void * | data, | |
const size_t | size | |||
) | [inline, virtual] |
HANDLE Dashel::StdinStream::hev [protected] |
The real data event handle.
Definition at line 421 of file dashel-win32.cpp.
HANDLE Dashel::StdinStream::hf [protected] |
The file handle.
Definition at line 418 of file dashel-win32.cpp.