phoenixframe平台连接socket服务器,并接收返回值的示例

package org.phoenix.cases.webservice;import java.util.LinkedList;import org.phoenix.action.WebElementActionProxy;import org.phoenix.model.CaseLogBean;import org.phoenix.model.UnitLogBean;import org.phoenix.utils.NetTelnet;/** * phoenixframe平台连接socket服务器,并接收返回值的示例 * @author mengfeiyang * */public class TestSocket extends WebElementActionProxy{private static String caseName = "";@Overridepublic LinkedList<UnitLogBean> run(CaseLogBean arg0) {init(caseName,arg0);NetTelnet n = new NetTelnet("10.161.88.64",8889);System.out.println(n.sendCommand("test","Password:"));//向服务器发送test指令,并接收结尾为Password:关键字的字符n.disconnect();return getUnitLog(); }}

版权声明:本文为博主原创文章,,未经博主允许不得转载。

要纠正别人之前,先反省自己有没有犯错

phoenixframe平台连接socket服务器,并接收返回值的示例

相关文章:

你感兴趣的文章:

标签云: