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