请问socket请求,怎么模拟?service返回的消息怎么获取

请教各位大神:我们现在要模拟socket请求,类似于这样的
5:::{"name":"message","args":[{"topic":"quote","data":{"ver":134,"msgid":0,"flag":0,"uuid":"","data":{"fid":8,"market":"sh","code":"603"}}}]}
现在要通过工具模拟这样的请求,小弟之前没有接触过,请各位大神指教!!

用java下的httpclient,C#下的httpwebrequest,VB,js下的xmlhttp,C++/MFC下的inet等都可以。

额,对于通信协议有是要求么,tcp还是udp,如果只是接受那一串数据,使用发包工具就可以了

Java的URL类可以模拟http请求,示例代码如下,body参数就可以放你模拟发送的数据:

 /**
     * 以http方式发送请求,并将请求响应内容以String格式返回
     * @param path    请求路径
     * @param method  请求方法
     * @param body    请求数据
     * @return 返回响应的字符串
     */
    public static String httpRequestToString(String path, String method, String body) {
        String response = null;
        HttpURLConnection conn = null;
        InputStream inputStream = null;
        InputStreamReader inputStreamReader = null;
        BufferedReader bufferedReader = null;
        try {
            URL url = new URL(path);
            conn = (HttpURLConnection) url.openConnection();
            conn.setDoOutput(true);
            conn.setDoInput(true);
            conn.setUseCaches(false);
            conn.setRequestMethod(method);
            if (null != body) {
                OutputStream outputStream = conn.getOutputStream();
                outputStream.write(body.getBytes("UTF-8"));
                outputStream.close();
            }

            inputStream = conn.getInputStream();
            inputStreamReader = new InputStreamReader(
                    inputStream, "UTF-8");
            bufferedReader = new BufferedReader(
                    inputStreamReader);
            String str = null;
            StringBuffer buffer = new StringBuffer();
            while ((str = bufferedReader.readLine()) != null) {
                buffer.append(str);
            }

            response = buffer.toString();
        } catch (Exception e) {
            logger.error(e);
        }finally{
            if(conn!=null){
                conn.disconnect();
            }
            try {
                bufferedReader.close();
                inputStreamReader.close();
                inputStream.close();
            } catch (IOException execption) {
                logger.error(execption);
            }
        }
        return response;
    }