Package pyGlobus :: Module xio :: Class XioFileAsyn
[show private | hide private]
[frames | no frames]

Class XioFileAsyn

XioBase --+    
          |    
XioFileBase --+
              |
             XioFileAsyn


XioFile class with Nonblocking operations
Method Summary
  __init__(self, stack, handle)
  __del__(self)
frees the memory malloc'd in either xioc.handle_create or in a accept callback,
  close(self, callback, arg, attr)
Return none
  open(self, callback, arg, contact_string, attr)
Creates the underlying handle, Nonblocking
  read(self, callback, arg, buffer, waitForBytes, data)
Nonblocking read call
  write(self, callback, arg, writeString, waitForBytes, data)
Nonblocking write call
    Inherited from XioFileBase
  free_callback1(self, cbHandle)
  free_callback4(self, cbHandle)
    Inherited from XioBase
  get_handle(self)

Method Details

__del__(self)
(Destructor)

frees the memory malloc'd in either xioc.handle_create or in a accept callback,
Overrides:
pyGlobus.xio.XioFileBase.__del__ (inherited documentation)

close(self, callback, arg, attr=None)

Parameters:
callback - - A Python function that has a signature func(arg,handle,errTuple) Where arg is the user arg,passed into this function, handle is a SWIG'ized globus_xio_handle_t pointer, and errTuple is a tuple containing (0,None) if there are no errors or (error_code, error_message) if there is an error
arg - - A user argument that will be passed to the callback function.
attr - - a XioAttr object
Returns:
None
Raises:
XioFileException - A XioFileException is raised if there is a problem opening the file

open(self, callback, arg, contact_string, attr=None)

Creates the underlying handle, Nonblocking
Parameters:
callback - - A Python function that has a signature func(arg,handle,errTuple) Where arg is the user arg,passed into this function, handle is a SWIG'ized globus_xio_handle_t pointer, and errTuple is a tuple containing (0,None) if there are no errors or (error_code, error_message) if there is an error
arg - - A user argument that will be passed to the callback function.
contact_string - - a Python string
attr - - a XioAttr object
Returns:
None
Raises:
XioFileException - A XioFileException is raised if there is a problem opening the file

read(self, callback, arg, buffer, waitForBytes=1, data=None)

Nonblocking read call
Parameters:
callback - - A Python function that has a signature func(arg,handle,errTuple,buffer, nbytes, data_desc) Where arg is the user arg,passed into this function, handle is a SWIG'ized globus_xio_handle_t pointer, and errTuple is a tuple containing (0,None) if there are no errors or (error_code, error_message) if there is an error, buffer is the data which has been read in, nbytes is the number of bytes read in, data_desc is a SWIG'ized globus_xio_data_descriptor_t pointer.
arg - - A user argument that will be passed to the callback function.
buffer - - A pyGlobus.util.Buffer object
waitForBytes - - an int telling how many bytes to wait to recieve before returning
data - - a XioDataDescriptor object
Returns:
None
Raises:
XioFileException - A XioFileException is raised if there is a problem reading from the handle

write(self, callback, arg, writeString, waitForBytes=0, data=None)

Nonblocking write call
Parameters:
callback - - A Python function that has a signature func(arg,handle,errTuple,buffer, nbytes, data_desc) Where arg is the user arg,passed into this function, handle is a SWIG'ized globus_xio_handle_t pointer, and errTuple is a tuple containing (0,None) if there are no errors or (error_code, error_message) if there is an error, buffer is the data which has been read in, nbytes is the number of bytes read in, data_desc is a SWIG'ized globus_xio_data_descriptor_t pointer.
arg - - A user argument that will be passed to the callback function.
writeString - - a string that will be written to the handle
waitForBytes - - an int telling how many bytes to write before returning, the default is the length of the string.
data - - a XioDataDescriptor object
Returns:
None
Raises:
XioFileException - A XioFileException is raised if there is a problem writing to the handle

Generated by Epydoc 2.1 on Thu Dec 23 16:44:57 2004 http://epydoc.sf.net