Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
c++ - Sending own class as binary data over socket
Hy! I am trying to develop a Client Server Communication over TCP/IP. I want to use an own Message class and send this class as binary data over a socket. I want to use stream operators for reading and writing to the stream. How do I convert a class to binary data to send it? How do I use a socket and stream operators for reading and writing? Thanks a lot. Examples would help a lot:-) Ronny Jan 22 2007
Hello, you might want to look into the CORBA framework for the passing of objects. Using this framework you will not have to worry about socket programming. There should be plenty of documentation on socket programming on the net. A good book might be better though. Regards, Brecht Masterchief wrote:Hy! I am trying to develop a Client Server Communication over TCP/IP. I want to use an own Message class and send this class as binary data over a socket. I want to use stream operators for reading and writing to the stream. How do I convert a class to binary data to send it? How do I use a socket and stream operators for reading and writing? Thanks a lot. Examples would help a lot:-) Ronny Jan 22 2007
Masterchief skrev:Hy! I am trying to develop a Client Server Communication over TCP/IP. I want to use an own Message class and send this class as binary data over a socket. I want to use stream operators for reading and writing to the stream. How do I convert a class to binary data to send it? How do I use a socket and stream operators for reading and writing? Thanks a lot. Examples would help a lot:-) Jan 22 2007
Hy!There are some questions: Do you have full control of both ends of the socket? Jan 23 2007
"Masterchief" wrote:I am trying to develop a Client Server Communication over TCP/IP. I want to use an own Message class and send this class as binary data over a socket. I want to use stream operators for reading and writing to the stream. How do I convert a class to binary data to send it? How do I use a socket and stream operators for reading and writing? Jan 24 2007
|