x


LAN servers detection without MasterServer

Is it possible to create and to detect LAN servers avoiding MasterServer?

Quake uses broadcast pings to detect servers. I mean, client sends broadcast request (to the whole LAN) and a server (if exists) responds to the client. So they find each other.

Is it possible to use this scheme in Unity?

Thank you.

more ▼

asked Oct 26 '10 at 05:12 AM

Anton Petrov gravatar image

Anton Petrov
447 10 11 23

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

You could probably implement that using standard .NET features from the System.Net.Socket namespace and System.Net.NetworkInformation namespace.

more ▼

answered Oct 26 '10 at 06:09 AM

jashan gravatar image

jashan
10.1k 25 40 116

Is this possible with Iphone 3G? There's an example on the unity page (http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf) but it seem's it's outdated, at least I can' get it to work.

Mar 24 '11 at 07:14 PM Mostley

It should be but I haven't tried it, yet.

Mar 25 '11 at 10:30 PM jashan
(comments are locked)
10|3000 characters needed characters left

Use .Net Socket.

Create two Udpclient with two ports, one for listening and one for sending. The Udpclient for sending should connect to 255.255.255.255 when broadcasting. However in this way u can only broadcast messages in the same network segment, (eg. if your ip is 192.168.1.#, u can't broadcast message to 192.168.0.# in this way). I haven't figure it out how to broadcast msg across routers.

Anyway it's pretty simple, because basicly u just need to broadcast your ipAddress to others, and once you got the host's ip you can use Unity's Network to do the rest of things

more ▼

answered Jan 31 at 10:09 AM

Sparrowfc gravatar image

Sparrowfc
1 1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x705
x697
x680

asked: Oct 26 '10 at 05:12 AM

Seen: 1839 times

Last Updated: Jan 31 at 10:09 AM