实
实
现
现
connectTCP
connectTCP
和
和
connectUDP
connectUDP
将所有的底层操作放置到connectsock中
实现connectTCP和connectUDP成为简单调用
int connectTCP(const char *host, const char *service)
/* Arguments
host -name of host to which connection is desired
service –service associated with the desired port
*/
{
return connectsock(host, service, “tcp”);
}
互
互
联
联
网
网
络
络
程
程
序
序
设
设
计
计