x


UDP/TCP Simple example on how to send a receive messages from two Unity builds

Hi Im trying to send and receive messages between 2 unity builds over a LAN as fast as possible, I have used the in-built unity networking and I get a Ping of 30-100ms which is two poor (Im after <10ms).

So after those tests I am looking at writing either a UDP/TCP simple string sender between the computers. My main question has anyone got an example of how to send and receive a simple string using either TCP/UDP.

Thanks for the help.

more ▼

asked Mar 29 '10 at 09:47 AM

Lloyd Hooson gravatar image

Lloyd Hooson
67 1 1 6

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

2 answers: sort voted first

In Unity, you have access to all the standard .Net socket functions, so I would suggest perhaps trying some of the non unity-specific C# socket tutorials or examples out there, such as this one:

Simple Client-server Interactions using C#

more ▼

answered Mar 29 '10 at 10:57 AM

duck gravatar image

duck ♦♦
41.4k 95 152 415

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

Hi,

I suggest the BeamServer library, look at http://www.beamserver.com/

more ▼

answered Jul 07 '10 at 03:55 PM

Abalore gravatar image

Abalore
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:

x5273
x726
x31
x30

asked: Mar 29 '10 at 09:47 AM

Seen: 8531 times

Last Updated: Mar 29 '10 at 09:47 AM