java socket c++

socket = new Socket("ip", port);
in = new BufferedReader(new InputStreamReader(socket
.getInputStream()));
out = new PrintWriter(socket.getOutputStream(), true);
            //数据包长度  89
            char[] pkgLen =  getChar(8);
                   pkgLen[0] ='8';
                   pkgLen[1] ='9';
            //请求类型   0
            char[] requestType = getChar(4);
                   requestType[0]='0';
            //错误代码  0000
            char[] errorCode = getChar(4);
           errorCode[0]='0';
           errorCode[1]='0';
           errorCode[2]='0';
           errorCode[3]='0';
            //请求类型 0
            char[] queryType = getChar(1);
                   queryType[0]='0';
            //查询条件
            char[] queryCondi =getChar(64);
            //返回记录数
            char[] rsponseCount = getChar(8);
                   rsponseCount[0]='1';
                   rsponseCount[1]='0';
                   rsponseCount[2]='0';

你可能感兴趣的:(java,C++,c,socket,C#)