I want to use Unity3d develope my game client, but in server side use my own C++ Project,the problem is how can i communicate with my server . Unity3d has Network class , it can connect to a server use tcp , but has not "SendData" function , so my question is ,if i want to send a message to the server, how can i write code , and when i received data from server , how can i devide it to defferent messages.
I've just started looking at Unity's networking capability, so this isn't authoritative, but might get you started. First, you are not limited to just the Unity Network class. From the docs:
".NET socket libraries can be used for real-time networking, by opening TCP/IP sockets or sending UDP messages."
So on the Unity Client side, you would just write a C# script, that called the various .NET socket functions. Here are two links I found that might be useful:
and
Update: for some sample code, see this Answer for TCP Client code