Skip to content

Instantly share code, notes, and snippets.

View aaachuan's full-sized avatar
😌
Focusing

aaachuan

😌
Focusing
  • Shanghai,China
View GitHub Profile
@aaachuan
aaachuan / SocketWithPython.md
Last active October 10, 2019 02:37
Python Socket编程

Socket With Python

Socket是众多IPC的一种,在其它特定的场景下,其它方式的IPC性能可能会更佳, 但是对于跨平台这点,Socket绝对是唯一的选择。

Socket最初出现在1971年的ARPANET,源自RFC 147,而如今的Socket实现,绝大多数 都来源于Berkeley sockets(1983)。Socket最常见的就是C/S应用上,当然,也有用于同一 主机间进程通信的——Unix domain sockets

在Python里有两个和Socket有关的主要模块:socketsocketserver,其中,socket模块提供底层网络接口,即标准的BSD Socket API,