Test cases for Broadcastservice

Source: Internet
Author: User

After the program runs, it needs to be tested with multiple Telnet clients

The connected command is Conn DeviceNumber

Broadcast command for Broa message

It is important to note that the sample code has a bug,

The storage of the broadcastdict itself is the counterpart of the Cxxx and the device collection
broadcastdict["C001"] =Newlist<string> {"V001" }; broadcastdict["C002"] =Newlist<string> {"V001","V002" }; broadcastdict["C003"] =Newlist<string> {"V002"};
But when used in the back, the inside as a judge of the use of the session. DeviceNumber
 lock   (Broadcastsyncroot) {                 // key: The key of the value to get.  // value: When this method returns a value, if the key is found, Returns the value associated with the specified key,  //  Otherwise, the value parameter is returned The type default value of the number. The parameter is passed without initialization.  bool  flag = Broadcastdict.trygetvalue (session.                DeviceNumber, out   targetdevicenumbers);  if  (flag = = false   return  ; }            }

Test cases for Broadcastservice

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.