Python 提供了两个基本的 socket 模块:
Socket它提供了标准的BSD Socket API。SocketServer它提供了服务器重心,可以简化网络服务器的开发。
下面讲解下 Socket模块功能。
| docker network create etcd --subnet 172.19.0.0/16 | |
| docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \ | |
| -name etcd0 \ | |
| -advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \ | |
| -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ | |
| -initial-advertise-peer-urls http://172.19.1.10:2380 \ | |
| -listen-peer-urls http://0.0.0.0:2380 \ | |
| -initial-cluster-token etcd-cluster-1 \ | |
| -initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \ |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
| <title>Auto play html audio in iOS WeChat InAppBrowser the right way</title> | |
| </head> | |
| <body> | |
| <h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1> | |
| <p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</p> |