qt-interest@trolltech.com
[Top] [All Lists]

Writing one's own class on a socket

Subject: Writing one's own class on a socket
From: Paul England
Date: Mon, 29 May 2006 17:47:29 +0900
I'm writing a little app, which requires me to send a user-defined class
on a socket.  It looks like QDataStream is what I need, but all the
member functions I have tried won't work.  From what I could see,
writeRawBytes sounds good, but it moans when I try to compile.

My attempt to no avail was:

socket = new QSocket();
user_class my_class;

QDataStream ds(socket);
ds.writeRawBytes(my_class, sizeof(my_class);

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>