return a file-like object that operates on the ssl connection

def makefile(self, mode='r', bufsize=-1):
        'return a file-like object that operates on the ssl connection'
        sockfile = gsock.SocketFile.__new__(gsock.SocketFile)
        gfiles.FileBase.__init__(sockfile)
        sockfile._sock = self
        sockfile.mode = mode
        if bufsize > 0:
            sockfile.CHUNKSIZE = bufsize
        return sockfile