if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { return Py_BuildValue("d", -1.0); /* convert C -> Python */ } bzero((char *)&addr, sizeof(addr)); if ((hp = gethostbyname(host)) == NULL) { return Py_BuildValue("d", -2.0); /* convert C -> Python */ ...
www.dbjr.com.cn/article/506...htm 2025-6-5