summaryrefslogtreecommitdiff
path: root/includes/BStdIO.h
blob: 9b7e3626f782fe12a29be4efa6b9693fe2c5df9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once

#include <Handle.h>
#include <Selectable.h>

namespace Balau {

// these classes might very well need to have their own
// special version for win32; at least from a Handle.
class StdIN : public Selectable {
  public:
      StdIN();
    virtual const char * getName();
    virtual void close() throw (GeneralException);
  private:
    virtual ssize_t recv(int sockfd, void *buf, size_t len, int flags);
    virtual ssize_t send(int sockfd, const void *buf, size_t len, int flags);
};

class StdOUT : public Selectable {
  public:
      StdOUT();
    virtual const char * getName();
    virtual void close() throw (GeneralException);
  private:
    virtual ssize_t recv(int sockfd, void *buf, size_t len, int flags);
    virtual ssize_t send(int sockfd, const void *buf, size_t len, int flags);
};

class StdERR : public Selectable {
  public:
      StdERR();
    virtual const char * getName();
    virtual void close() throw (GeneralException);
  private:
    virtual ssize_t recv(int sockfd, void *buf, size_t len, int flags);
    virtual ssize_t send(int sockfd, const void *buf, size_t len, int flags);
};

};