My doubts about Unity Networking. Please Help!

Yo!

So I have already made 2 games with Photon networking and know some UNET HLAPI, but hate the way you implement stuffs in HLAPI (photon feels practical). And that’s why I started with UNET’s LLAPI I learned if stuff from here and there and was able to send a string to the server. I feel UNET’s LLAPI is more practical and easy to understand for me (at least till now) and would like to learn it more. So I made this thread for doubts about LLAPI and a good source to learn it from.

Note: Please don’t give links to unity’s manual I have already tried it and I didn’t understand any of the stuff. I learned all stuff that I know about LLAPI from here :

  1. LLAPI: how to send data to clients? - Unity Engine - Unity Discussions
  2. Bounce Castle on Steam

Problem
I have client which sends some data to the server I want that data to be sent to other clients. How should I do that ? Please help!

I’ll post more doubts down below!

Please help me to learn it!

To answer your problem… Commands and ClientRpcs.
For the client to send data to the server, call a Command.
Then for the server to send data to clients call a ClientRpc (or you can use SyncVars or SyncLists depending on the data).

I suppose that’s only in Unity’s HLAPI? I want to do with LLAPI. Can just show me a simple code, please?

Like how do I call that RPC then on server (and for client too)?

My new doubt.

clientPort = 1111;

NetworkTransport.StartBroadcastDiscovery(hostId, clientPort, key, version, subVersion, buffer, bufferSize, timeout, out error);

That code just broadcasts the message just to the clientPort (which is to only one client, as 2 clients on the same server with same port does not seem to work). I want to broadcast my message to al the clients from the server. How do I do that?