c++ - 关于套接字编程和多线程的面试问题

标签 c++ multithreading sockets

请任何人告诉我以下主题可以在面试中提出的问题

  • 套接字编程
  • 多线程

提前感谢所有提供时间的人

最佳答案

作为招聘经理,我最喜欢问的网络问题是:

Imagine a user sitting at an Ethernet-connected PC. He has a browser open. He types "www.google.com" in the address bar and hits enter.

Now tell me what the first packet to appear on the Ethernet is.

可能的答案(正确性各不相同)包括:

  • 我不知道。
  • 一个 HTTP 请求 包。
  • 一个 TCP 同步数据包。
  • DNS 请求数据包。
  • 一个 ARP 数据包。
  • 视情况而定。

每个答案都揭示了人们对网络的总体理解,尤其是 IP 和 TCP。随后的讨论可以揭示他们的理解。 (当然,假设提问者在这方面有一定的专业知识)。

关于c++ - 关于套接字编程和多线程的面试问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/177197/

相关文章:

multithreading - 父线程何时与非全局范围的 ada 任务类型变量同步?

libupnp 下的 ios 多线程套接字卡在 send() 上

python - 根据标志退出Python线程

java - 套接字异常 : errno = 0x44

c++ - 使用 pqexecparams 通过 libpq 插入点

c++ - libstdc++ std::throw_with_nested() 需要多态类型

.net - 部署工具 ENTERPRISE - 什么是最适合 Windows 环境的工具?

node.js - 套接字.io : associate browser and computer with the connection

c - 套接字结构 : casting?

c++ - 从 pcl::PointCloud 创建 pcl::PointCloud::Ptr