A
Abubakar
Hi,
I am writing a server in C# and client in C++ (pure, not managed). The
communication goes on through sockets. In C# I am using NetworkStream to
send text data (by converting it to byte array) to the c++ client. In c++
client I have "recv" (winsock) function through which I receive everything.
Now there is a need to pass a "struct" of C# through the "write" function of
network stream. I want to know how this can be done. Also I would want to
reconstruct the struct at the c++ side after receving data through recv.
Please use a simple struct with few ints to demo this.
Regards,
Ab.
I am writing a server in C# and client in C++ (pure, not managed). The
communication goes on through sockets. In C# I am using NetworkStream to
send text data (by converting it to byte array) to the c++ client. In c++
client I have "recv" (winsock) function through which I receive everything.
Now there is a need to pass a "struct" of C# through the "write" function of
network stream. I want to know how this can be done. Also I would want to
reconstruct the struct at the c++ side after receving data through recv.
Please use a simple struct with few ints to demo this.
Regards,
Ab.