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