'makefile([mode[, bufsize]]) -> file object
Return a regular file object corresponding to the socket.  The mode
and bufsize arguments are as for the built-in open() function.'

def makefile(self, mode='r', bufsize=(-1)):

    return FileSocket(self._sock, mode, bufsize)
