You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
" assert not os.path.exists(addr), f\"{addr} in use\"\n",
1465
+
" s = socket.socket(family, typ)\n",
1466
+
" s.bind(addr)\n",
1467
+
" s.listen(*listen_args)\n",
1468
+
" return s"
1469
+
]
1470
+
},
1471
+
{
1472
+
"cell_type": "markdown",
1473
+
"metadata": {},
1474
+
"source": [
1475
+
"You can create a TCP client and server pass an int as `port` and optional `host`. `host` defaults to your main network interface if not provided. You can create a Unix socket client and server by passing a string to `port`. A `SOCK_STREAM` socket is created by default, unless you pass `dgram=True`, in which case a `SOCK_DGRAM` socket is created. `n_queue` sets the listening queue size."
0 commit comments