bin/pc: Mark non-returning function as void
[haiku.git] / src / add-ons / print / transports / shared / SocketStream.h
blob11072f81972eb3364087d3bdfe0efb6c10bc606c
1 // Sun, 18 Jun 2000
2 // Y.Takagi
4 #ifndef __SocketStream_H
5 #define __SocketStream_H
7 #include <iostream>
9 class Socket;
11 class socketstreambuf : public streambuf {
12 public:
13 explicit socketstreambuf(Socket *sock, streamsize n);
14 ~socketstreambuf();
16 protected:
17 virtual int underflow();
18 virtual int overflow(int);
19 virtual int sync();
21 private:
22 Socket *__sock;
23 streamsize __alsize;
24 char *__pu;
25 char *__po;
28 class socketstreambase : public virtual ios {
29 public:
30 socketstreambuf *rdbuf();
32 protected:
33 socketstreambase(Socket *sock, streamsize n);
34 ~socketstreambase() {}
36 private:
37 socketstreambuf buf;
40 inline socketstreambuf *socketstreambase::rdbuf()
42 return &this->buf;
45 class isocketstream : public socketstreambase, public istream {
46 public:
47 explicit isocketstream(Socket *sock, streamsize n = 4096);
48 virtual ~isocketstream();
52 class osocketstream : public socketstreambase, public ostream {
53 public:
54 explicit osocketstream(Socket *sock, streamsize n = 4096);
55 virtual ~osocketstream();
58 #endif // __SocketStream_H