[Qt-interest] Alternative for bind() in TCP sockets
sarvesh saran
aquarian.thunder at gmail.com
Tue Jan 25 09:41:53 CET 2011
Hi Anisha,
check the fortune client/server example to get a better understanding of
QTcpSocket :
http://doc.qt.nokia.com/latest/network-fortuneclient-client-cpp.html
Also, there may be a typo in your connect call shown below:
// The SLOT----------------------------------------------------
void QTcpSocketUtility :: myNewConnection ()
{
objTcpSocket = tcpServer->nextPendingConnection ();
* bool h = connect (objTcpSocket, SIGNAL(newConnection()), objTcpSocket,
SLOT(myNewConnection()));*
cout << "\nh: \n" << h;
}
thanks,
Sarvesh
On Tue, Jan 25, 2011 at 12:24 PM, Thiago Macieira <thiago at kde.org> wrote:
> On Tuesday, 25 de January de 2011 11:59:33 Anisha Kaul wrote:
> > // Receive Message function-------------------------------------
> > cout << objTcpSocket->isOpen (); // prints 0
> > returnValReadDatagram = objTcpSocket->read (receivedData, 0);
> > // returns -1
>
> Is this function connected to the signal readyRead()?
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110125/f1c5d0b5/attachment.html
More information about the Qt-interest-old
mailing list