开发者

AS3 NetConnection Recommended Usage

开发者 https://www.devze.com 2023-04-12 21:06 出处:网络
What is the recommended approach for using the NetConnection class? Repeated usage, use one NetConnection instance to send all messages.

What is the recommended approach for using the NetConnection class?

  1. Repeated usage, use one NetConnection instance to send all messages.
    • What's the behavior of a single NetConnection instance when you send a second message before the f开发者_开发问答irst one completes? Does it matter?
  2. Create one NetConnection instance for every message.


I guess you should ask your instance for uncompleted operations. If your instance is not occupied feel free to reuse it. Otherwise create a new one.

Maybe object pooling is a keyword here

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号