dup() -> socket object Duplicate the socket. Return a new socket object connected to the same system resource. The new socket is non-inheritable.
(self)
| 278 | raise TypeError(f"cannot pickle {self.__class__.__name__!r} object") |
| 279 | |
| 280 | def dup(self): |
| 281 | """dup() -> socket object |
| 282 | |
| 283 | Duplicate the socket. Return a new socket object connected to the same |
| 284 | system resource. The new socket is non-inheritable. |
| 285 | """ |
| 286 | fd = dup(self.fileno()) |
| 287 | sock = self.__class__(self.family, self.type, self.proto, fileno=fd) |
| 288 | sock.settimeout(self.gettimeout()) |
| 289 | return sock |
| 290 | |
| 291 | def accept(self): |
| 292 | """accept() -> (socket object, address info) |
nothing calls this directly
no test coverage detected