⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 printer_test

📁 支持组件模型CCM的开源中间件-mico
💻
字号:
#!/bin/sh# This file is part of the load-balancing exampleNS_ADDR=inet:`uname -n`:12556RC="-ORBNamingAddr $NS_ADDR"for i in 1 2 3 ;doif [ $i = "1" ] ;then  echo "Launching naming service without load-balancing option ..."  nsd -ORBIIOPAddr $NS_ADDR &  ns_pid=$!elif [ $i = "2" ] ;then  echo "Launching naming service with round-robin load-balancing option ..."  nsd --lb round_robin -ORBIIOPAddr $NS_ADDR &  ns_pid=$!elif [ $i = "3" ] ;then  echo "Launching naming service with random load-balancing option ..."  nsd --lb random -ORBIIOPAddr $NS_ADDR &  ns_pid=$!fi;echo "Wait 2 seconds for the naming service to be ready ..."sleep 2echo "Launching servers ..."# This server is named Laser_Admin.Printer using the name format id.kind./Server Laser_Admin.Printer $RC &server1_pid=$!# This server is named Injet_Marketing.Printer using the name format id.kind./Server InkJet_Marketing.Printer $RC &server2_pid=$!echo "Wait 2 seconds for the servers to be ready ..."sleep 2echo "Launching client ..."# The client looks for the server named Laser_Admin.Printer.# If the naming service does not do load-balancing, the reference to the# server named Laser_Admin.Printer will be given to the client.  However,# if the naming service is launched using the load-balancing option of either# "--lb round_robin" or "--lb random", the reference to one of the servers# with the kind value of Printer will be given to the client../Client Laser_Admin.Printer 10 $RCkill $ns_pid $server1_pid $server2_pidecho "======== Execution ends ========"done

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -