- Home /
Unity client <--> Java Server
Hi. I have a multiplayer game with a Java server, and I'd like to switch over my clients to Unity. How do I write the server-side networking code to talk to the Unity clients? (I know of the networking capabilities built into Unity, but I need the server to be Java. Is the wire protocol specified somewhere? Are there Java server-side libraries for Unity?)
Answer by Bunny83 · Apr 25, 2013 at 12:25 PM
Unity uses RakNet as Network engine. It uses it's own UDP protocol. I don't think it's worth to try to adapt this. You can simply use .Net-Sockets to communicate with any server you like. Keep in mind that if your client should be a webplayer, there are security restrictions. You can still use TCP connections as long as your server provides an additional socket policy server. You shouldn't use UDP from a webplayer since every packet has to be verified by the policy server because UDP is a connectionless protocol.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Use KryoNet in C# via IKVM 0 Answers
Help with Java socket server 1 Answer
How do I get menus to show up on a client? 0 Answers
Sending bytes over network 0 Answers