Remoto - VFS: VFS_udp_socket.h Source File
Remoto - VFS
VFS_udp_socket.h
Go to the documentation of this file.
1 #ifndef VFS_UDP_SOCKET_H
2 #define VFS_UDP_SOCKET_H
3 
4 #include <QUdpSocket>
5 
6 #include "VFS_base/VFS_node.h"
7 
8 class VFS_udp_socket : public VFS_node
9 {
10  Q_OBJECT
11 
12  public:
13  Q_INVOKABLE explicit VFS_udp_socket(QHostAddress multicast, quint16 port, QString mode="rw");
14  virtual ~VFS_udp_socket();
15 
16  virtual bool isContainer();
17  virtual QString reportDetails();
18 
19  protected:
20  QHostAddress _address;
21  quint16 _port;
22  QUdpSocket _socket;
23  QString _mode;
24 
25  private:
26  // virtual void ls(VFS_request *r);
27  // virtual void read(VFS_request *r);
28  virtual void write(VFS_request *r);
29  // virtual void metadata(VFS_request *r);
30  // virtual void report(VFS_request *r);
31  // virtual void submit(VFS_request *r);
32  // virtual void rm(VFS_request *r);
33 
34  public slots:
35  virtual bool listen();
36  // virtual void clientMessage(QByteArray message);
37 
38  virtual void socketError(QAbstractSocket::SocketError error);
39 
40  protected slots:
41  // virtual void createNewConnection();
42  // virtual void closeConnection();
43  void readyRead();
44 
45 };
46 
47 #endif // VFS_TCP_SOCKET_H
48 
VFS_node is the base class from which all other VFS_node classes derive.
Definition: VFS_node.h:143
The base class for all requests between nodes.
Definition: VFS_node.h:54
Open a UDP port in write or read/write mode.
Definition: VFS_udp_socket.h:9
virtual void socketError(QAbstractSocket::SocketError error)
virtual bool isContainer()
A VFS_udp_socket cannot have children.
QString _mode
Either "rw" or "w".
virtual QString reportDetails()
Report details of this node.
quint16 _port
UDP port.
virtual ~VFS_udp_socket()
Q_INVOKABLE VFS_udp_socket(QHostAddress multicast, quint16 port, QString mode="rw")
Create a VFS_udp_socket.
QHostAddress _address
Address used to listen or speak.
QUdpSocket _socket
UDP socket.
virtual bool listen()
virtual void write(VFS_request *r)
Write to this node, which will emit UDP datagrams to the network.