19 #ifndef TIANCHI_TCUDP_H
20 #define TIANCHI_TCUDP_H
22 #include <tianchi/tcglobal.h>
26 class TIANCHI_API
TcUdp :
public QUdpSocket
29 typedef QUdpSocket inherited;
38 bool sendMessage(QHostAddress host,
int port, QByteArray S);
40 inline bool sendMessage(QHostAddress host,
int port, QString S)
43 void sendBroadcast(
int port, QByteArray S);
45 inline void sendBroadcast(
int port, QString S)
49 inline void setRecvMethod(QObject* recvObject, QByteArray recvMethod)
50 { m_recvObject = recvObject; m_recvMethod = recvMethod; }
54 void recvMessage(QHostAddress client, QByteArray datagram);
60 QObject* m_recvObject;
61 QByteArray m_recvMethod;
64 #endif // TIANCHI_TCUDP_H