enet broadcast behaviour
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
enet broadcast behaviour
I dont seem to understand host:broadcast() function.. is it to send a package from a peer to the server or send a package from server to all connected peer only? It seems to work both ways, but when I do it from the peer side, it fails most of the time to send it.. but it also works sometimes, what's happening?
-
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: enet broadcast behaviour
It sends the data to all connected peers. For the client that is generally just the server. For the server its all of the connected peers. Actually, it does not send the data. It just queues it to be sent. The data is actually sent when host:service or host:flush is called. Are you doing both of those things?
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot], slime and 11 guests