Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Don't miss out on the Unite LA Keynote for the latest information from Unity! Set a reminder!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

UNET message acknowledgement.

Discussion in 'Connected Games' started by MaxZemsky, Aug 12, 2018.

  1. MaxZemsky

    MaxZemsky

    Joined:
    Nov 7, 2017
    Posts:
    14
    I am using the NetworkServer.SendToAll method - I need to know when a message has successfully reached all the clients (the second message should be sent only when the first message has been received by all the Clients). How can I do this?
    Thanks!
     
  2. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545
    Shortly, no way. We did think about notifications, but now i afraid that is not possible. Sorry about :( you are still able to implement this on top of transport by receiving ack from all peers. For ack i think allcost qos should be used
     
  3. MaxZemsky

    MaxZemsky

    Joined:
    Nov 7, 2017
    Posts:
    14
    I send a big about of positions updates over the UNET. In certain point the network bandwidth reaches it's maximum (1.5MB/sec). Is there a way i could monitor it to prevent this?
    Originally, i thought to send the next message only when the previous message has been received by all the clients. Is there any workaround that i can implement?
     
  4. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545
    two things if you want just monitor your bandwidth, you can use bandwidth related statistical functions provided by library. If you want to avoid false receiving on your Send() call, you can provide set sendable callback, which will hit every time when library will have space for new message. Examples - see server.dll documentation and library reference.
     
  5. MaxZemsky

    MaxZemsky

    Joined:
    Nov 7, 2017
    Posts:
    14
    Thank you for your fast reply.
    In the server documentation i have found the following callback:
    Code (CSharp):
    1. GlobalConfig config = new GlobalConfig();
    2. config.SendCallback = new SendCallbackDelegate(SendCallback);
    Is this the "sendable callback" you were talking about?

    However, i cannot find this callback function in the UnityEngine.Networking.GlobalConfig class.

    Am i missing something?
     
  6. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545