Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Connect client and server on same machine

$
0
0
Hi!

I've written a client and a server, both in separate Unity projects, and I'm trying to get them to connect through localhost (for development purposes). It works when I connect from different machines through my router, but not on one machine. I suspect this has to do because I then open two sockets on the same port on this machine.

How do I get my client and server to interact on the same machine? Thanks :) Code below.

Code (CSharp):
  1. //SERVER
  2. void Connect()
  3. {...
Connect client and server on same machine

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>