Socket网络编程略窥一二.. 网络原理课的课程设计
完全是看这篇文章学的, 貌似有中文版但是我点不进去
就不说两句了, 底层的东西, 全是细节, 非要概括的话可以引用原文第五章的小标题来描述这个过程
5.1. getaddrinfo()—Prepare to launch!
5.2. socket()—Get the File Descriptor!
5.3. bind()—What port am I on?
5.4. connect()—Hey, you!
5.5. listen()—Will somebody please call me?
5.6. accept()—”Thank you for calling port 3490.”
5.7. send() and recv()—Talk to me, baby!
5.8. sendto() and recvfrom()—Talk to me, DGRAM-style
5.9. close() and shutdown()—Get outta my face!
我的代码, 这是linux的, windows有点小不一样, 我不知道 :): Continue reading