gif gif up gif contents
Nächste Seite: D.1.2 CBclient Vorige Seite: D.1 Klassen der Kommunikationsschnittstelle

D.1.1 IpcClient

IpcClient ist die Basisklasse für alle weiteren Kommunikationsklassen. Die Zugriffe auf Betriebssystemfunktionen und -datentypen sind in dieser Klasse verkapselt.

class IpcClient  {
 public:
    /* Constructors */
    IpcClient(char *host, int portnr);
   
    /* Destructor */
    ~IpcClient();
    
    /* Member functions */
    IpcClient& operator<<(char *str);
    IpcClient& operator<<(char c);
    
    IpcClient& operator>>(char *str);
    IpcClient& operator>>(char& c);
    
    void writeBuffer(char *buf, int len);
    
    /* read a string until maxLen or NULL */
    int readString(char *buf, int maxLen); 
    
    /* read a string until EOF or NULL is reached */
    char* readString(int timeout);
    
    /* read a string until e,NULL,EOF or timeout occurs */
    char* readStringUntilChar(char e, int timeout);
    
    void close();

    operator bool();

 protected:
    // ...    
 private:
     // ...
};



Christoph Quix
31. Juli 1996