Fixed local connection unimport struct and functools , and added write request handle remote server