add network test code
fix compile error in linux