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

Last change on this file since 1350 was 1349, checked in by mervart, 16 years ago

* empty log message *

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