Python 提供了两个基本的 socket 模块:
Socket它提供了标准的BSD Socket API。SocketServer它提供了服务器重心,可以简化网络服务器的开发。
下面讲解下 Socket模块功能。
| /** | |
| * STEP 1: Setup | |
| * - Open Chrome Secure Shell settings | |
| * - Open JS Console (CTRL+SHIFT+J) | |
| * - Copy and paste the following: | |
| */ | |
| var s7d_colours = { | |
| 'base03': '#002b36', | |
| 'base02': '#073642', | |
| 'base01': '#586e75', |
| [ 0.000000] Booting Linux on physical CPU 0x0 | |
| [ 0.000000] Linux version 4.9.241 (khadas@b8b78b6b0b20) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #64 SMP PREEMPT Tue Mar 30 14:40:40 CST 2021 | |
| [ 0.000000] Boot CPU: AArch64 Processor [410fd034] | |
| [ 0.000000] Machine model: Khadas VIM3 | |
| [ 0.000000] efi: Getting EFI parameters from FDT: | |
| [ 0.000000] efi: UEFI not found. | |
| [ 0.000000] OF: reserved mem: __reserved_mem_alloc_size, start:0x0000000005000000, end:0x0000000005400000, len:4 MiB | |
| [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000005000000, size 4 MiB | |
| [ 0.000000] OF: reserved mem: initialized node linux,secmon, compatible id shared-dma-pool | |
| [ 0.000000] OF: reserved mem: __reserved_mem_alloc_size, start:0x000000007f800000, end:0x0000000080000000, len:8 MiB |