outbound.writeBytes("/r/n/r/n");应该输出两个换行
建议用下列方式
URLConnection u=(new URL("http://www.sohu.com")).openConnection();//可以是任何URL
OutputStream os=u.getOutputStream();
InputStream is=u.getInputStream();如果是http可用
HttpURLConnection http=(HttpURLConnection)(new URL "http://www.sohu.com")).openConnection();
if(http.getResponseCode()==HttpURLConnection.HTTP_OK)){
//判断是否连接成功
}