Changes between Version 59 and Version 60 of RepyV2API

Changes between Version 59 and Version 60 of RepyV2API

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 59 and Version 60 of RepyV2API

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 59 and Version 60 of RepyV2API

Show
Ignore:
Timestamp:
12/23/09 22:21:56 (10 years ago)
Author:
justinc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RepyV2API

    v59 v60  
    7777||file.close||Close an open file.||example 2.1|| 
    7878 
    79 ||socket.recv||Read data from a socket||example 1.2|| 
    80  
    81 ||socket.send||Send data on a socket||example 1.2|| 
     79||socket.recv||Read data from a socket in a non-blocking manner||example 1.2|| 
     80 
     81||socket.send||Send data on a socket in a non-blocking manner||example 1.2|| 
    8282 
    8383||socket.close||Closes a socket||example 3.2|| 
    84  
    85 ||socket.willblock||Returns an indicator of whether or not a socket will block|| N/A (new call)|| 
    8684 
    8785||lock.acquire||Acquire the lock||example 1.6|| 
     
    902900 
    903901     LocalIPChanged (descends NetworkError) if the local system connection is broken because the local system changes its IP address. 
    904  
    905    <Side Effects> 
    906      If there is no buffered data, this call will block the thread until the other side calls send. 
     902    
     903     XXXException if the call would block. 
     904 
     905   <Side Effects> 
     906     None 
    907907 
    908908   <Resource Consumption> 
     
    937937     LocalIPChanged if the local system connection is broken because the local system changes its IP address. 
    938938 
    939    <Side Effects> 
    940      This call may block the thread until the other side calls recv. 
     939     XXXException if the call would block.    
     940 
     941   <Side Effects> 
     942     None 
    941943 
    942944   <Resource Consumption> 
     
    946948     The number of bytes sent. '''Be sure not to assume this is always the 
    947949     complete amount!''' 
    948  
    949  
    950 [[BR]]  
    951 ==== socket.willblock() ==== 
    952 ---- 
    953  
    954 (added call) 
    955  
    956 Returns a tuple of booleans {{{(recvwillblock,sendwillblock)}}} indicating if a socket may block if send or recv are called.   This allows the caller to determine if a deadlock may occur if the call is performed.   Note that returning True doesn't necessarily mean the call will block.   It could be that data was recently consumed / sent so the call will now proceed without blocking. 
    957  
    958  * Doc string: 
    959  
    960    <Purpose> 
    961      Determines if a socket may block if send or recv are called. 
    962  
    963    <Arguments> 
    964      None. 
    965  
    966    <Exceptions> 
    967      SocketClosedLocal if the socket is closed locally. 
    968  
    969      SocketClosedRemote if the socket was closed remotely '''and''' there is no data pending for recv. 
    970  
    971    <Side Effects> 
    972      None. 
    973  
    974    <Resource Consumption> 
    975      None. 
    976  
    977    <Returns> 
    978      A tuple (recvwillblock, sendwillblock) of booleans.    
    979950 
    980951