source: ntrip/trunk/BNC/bncsocket.h@ 1345

Last change on this file since 1345 was 1345, checked in by mervart, 15 years ago

* empty log message *

File size: 777 bytes
Line 
1#ifndef BNCSOCKET_H
2#define BNCSOCKET_H
3
4#include <QtNetwork>
5
6class bncSocket : public QObject {
7
8 public:
9 bncSocket(QTcpSocket* socket);
10 ~bncSocket();
11
12 void close();
13 qint64 bytesAvailable() const;
14 bool canReadLine() const;
15 QByteArray readLine(qint64 maxlen = 0);
16 bool waitForReadyRead(int msecs = 30000);
17 qint64 read(char *data, qint64 maxlen);
18 qint64 write(const char *data, qint64 len);
19 bool waitForBytesWritten(int msecs = 30000);
20 void connectToHost(const QString &hostName, quint16 port,
21 QIODevice::OpenMode mode = QIODevice::ReadWrite);
22 bool waitForConnected(int msecs = 30000);
23 QAbstractSocket::SocketState state() const;
24
25 private:
26 QTcpSocket* _socket;
27};
28
29#endif
Note: See TracBrowser for help on using the repository browser.