Rudiments
websocket.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_TLS_H
5 #define RUDIMENTS_TLS_H
6 
7 #include <rudiments/private/websocketincludes.h>
8 
9 class RUDIMENTS_DLLSPEC websocket : public securitycontext {
10  public:
12  websocket();
13 
15  virtual ~websocket();
16 
20  void setFileDescriptor(filedescriptor *fd);
21 
25  filedescriptor *getFileDescriptor();
26 
27 
38  bool connect();
39 
40 
51  bool accept();
52 
57  ssize_t read(void *buf, ssize_t count);
58 
63  ssize_t write(const void *buf, ssize_t count);
64 
69  bool ping(const unsigned char *buf, ssize_t count);
70 
73  ssize_t pending();
74 
77  bool close();
78 
79 
82  ssize_t getSizeMax();
83 
84  #include <rudiments/private/websocket.h>
85 };
86 
87 #endif
Definition: websocket.h:9
Definition: filedescriptor.h:13
Definition: security.h:16