Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (23 sloc) 588 Bytes
///////////////////////////////////////////////////////////
// Sender.cpp
// Implementation of the Class Sender
// Created on: 06-一月-2012 23:17:31
// Original author: GA
///////////////////////////////////////////////////////////
#include "Sender.h"
MsgSender::MsgSender()
{
sender=new QUdpSocket();
}
MsgSender::~MsgSender()
{
delete sender;
}
int MsgSender::Send(Data *data)
{
QHostAddress *address;
address=new QHostAddress(data->GetIP());
int n;
n=sender->writeDatagram((data->OutPutBuff().toAscii()),*address,data->GetPort());
return n;
}