Browse Source

getState

master
Robin Thoni 11 years ago
parent
commit
31f4b08ac6
2 changed files with 6 additions and 2 deletions
  1. 5
    0
      ptsocket/ptsocket.cpp
  2. 1
    2
      ptsocket/ptsocket.h

+ 5
- 0
ptsocket/ptsocket.cpp View File

22
     connect(this, SIGNAL(readyRead()), this, SLOT(m_readyRead()));
22
     connect(this, SIGNAL(readyRead()), this, SLOT(m_readyRead()));
23
 }
23
 }
24
 
24
 
25
+PTSocket::State PTSocket::getState() const
26
+{
27
+	return m_state;
28
+}
29
+
25
 int PTSocket::getTimeout() const
30
 int PTSocket::getTimeout() const
26
 {
31
 {
27
     return m_timeout;
32
     return m_timeout;

+ 1
- 2
ptsocket/ptsocket.h View File

8
 #include <QTimer>
8
 #include <QTimer>
9
 #include <QMetaEnum>
9
 #include <QMetaEnum>
10
 
10
 
11
-//#define PT_DEBUG
12
-
13
 class LIBPTSOCKETSHARED_EXPORT PTSocket : public QTcpSocket
11
 class LIBPTSOCKETSHARED_EXPORT PTSocket : public QTcpSocket
14
 {
12
 {
15
 	Q_OBJECT
13
 	Q_OBJECT
26
     };
24
     };
27
     Q_ENUMS(State)
25
     Q_ENUMS(State)
28
 	PTSocket(QObject* p);
26
 	PTSocket(QObject* p);
27
+	State getState() const;
29
 	int getTimeout() const;
28
 	int getTimeout() const;
30
     int getPingInterval() const;
29
     int getPingInterval() const;
31
     bool isServerSide() const;
30
     bool isServerSide() const;

Loading…
Cancel
Save