tpastor / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

NetPeer.Recycle(NetOutgoingMessage msg) #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/lidgren-network-gen3/source/browse/trunk/Lidgren.Networ
k/NetPeer.MessagePools.cs#151

Needed public method.

Example:

var msg = client.CreateMessage();
...

try {
  client.SendMessage(msg, ...);
}
catch {
  client.Recycle(msg);
}

Original issue reported on code.google.com by imho.sapiens@gmail.com on 19 Jul 2011 at 10:26

GoogleCodeExporter commented 9 years ago
This is not needed for the current recycling strategy; calling SendMessage() 
will essentially spend the message for the application, and it will be 
automatically recycled when it has been sent (and acknowledged). A message 
cannot thus be sent more than once.

Original comment by lidg...@gmail.com on 20 Jul 2011 at 8:43