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

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

* empty log message *

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