阅读背景:

在非套接字上发送()套接字操作

来源:互联网 

While trying to implement a server and client, I noticed that the client was writing to stdout instead of through the network. I figured out that the file descriptor being returned by connect() is always zero, which explains why it was writing to stdout. But I can not figure out why connect() always returns zero instead of a valid socket. All the articles on the web I found with the same problem were due to precedence issues with wrapping if() around the connect() call. But I haven't done that, any help would be appreciated.While trying to implement a server and client,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: