Changes between Version 51 and Version 52 of RepyV2API

Changes between Version 51 and Version 52 of RepyV2API

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

Changes between Version 51 and Version 52 of RepyV2API

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

Changes between Version 51 and Version 52 of RepyV2API

Show
Ignore:
Timestamp:
12/18/09 14:02:00 (10 years ago)
Author:
justinc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RepyV2API

    v51 v52  
    232232 
    233233[[BR]] 
    234 ==== sendmessage(desthost, destport, message, localip=None, localport=None) ==== 
     234==== sendmessage(desthost, destport, message, localip, localport) ==== 
    235235---- 
    236236 
    237237(rename of ~~sendmess~~) 
    238238 
    239 Sends a UDP message to a destination host / port.   By default the system selects a localip and port for the outgoing message, but this can be overridden by passing in arguments that specify which port and IP to use.   If either the localip or localport are used, both must be.   Returns the number of bytes sent. 
     239Sends a UDP message to a destination host / port using a specified localip and localport.   Returns the number of bytes sent. 
    240240 
    241241 * Doc string: 
     
    251251      message: 
    252252         The message to send 
    253       localhost (optional): 
     253      localhost: 
    254254         The local IP to send the message from  
    255       localport (optional): 
     255      localport: 
    256256         The local port to send the message from  
    257257 
    258       Note: if you specify localhost, you must specify localport 
    259258 
    260259   <Exceptions> 
     
    269268 
    270269   <Resource Consumption> 
    271       This operation consumes 64 bytes + number of bytes of the message that were transmitted.   This requires that the localport (if specified) is allowed. 
     270      This operation consumes 64 bytes + number of bytes of the message that were transmitted.   This requires that the localport is allowed. 
    272271 
    273272   <Returns> 
     
    294293      PortInUseException (descends NetworkError) if the port cannot be listened on because some other process on the system is listening on it 
    295294 
    296       XXXException if there is already a udpserversocket with the same IP and port. (Conrad: I don't think we care (what type of exception this is). This is a coding error, not something you write code to catch / deal with.) 
     295      PortInUseException if there is already a udpserversocket with the same IP and port. 
    297296 
    298297      TypeError/ValueError if the port number or ip is wrong type or obviously invalid. 
     
    315314 
    316315[[BR]] 
    317 ==== openconnection(desthost, destport, localip=None, localport=None, timeout = 5) ==== 
     316==== openconnection(desthost, destport, localip, localport, timeout = 5) ==== 
    318317---- 
    319318 
    320319(rename of ~~openconn~~) 
    321320 
    322 Open a TCP connection to a remote computer, returning a socket object.   Optionally a localip and localport to connect from can be specified and if one is specified both must be.   There is a timeout value that can be set to limit the amount of time the system will wait for a response before abandoning the attempt to connect. 
     321Open a TCP connection to a remote computer, returning a socket object.   There is a timeout value that can be set to limit the amount of time the system will wait for a response before abandoning the attempt to connect. 
    323322 
    324323 * Doc string: 
     
    332331      destport: 
    333332         The port to use for communication 
    334       localip (optional): 
     333      localip: 
    335334         The local ip to use for the communication 
    336       localport (optional): 
     335      localport: 
    337336         The local port to use for communication 
    338337      timeout (optional): 
    339338         The maximum amount of time to wait to connect 
    340339 
    341       Note: if you specify localip, you must specify localport 
    342340 
    343341   <Exceptions> 
     
    361359 
    362360   <Resource Consumption> 
    363       This operation consumes 64*2 bytes of netsend (SYN, ACK) and 64 bytes of netrecv (SYN/ACK).   This requires that the localport (if specified) is allowed.   Upon success, this call consumes an outsocket. 
     361      This operation consumes 64*2 bytes of netsend (SYN, ACK) and 64 bytes of netrecv (SYN/ACK).   This requires that the localport is allowed.   Upon success, this call consumes an outsocket. 
    364362 
    365363   <Returns> 
     
    388386      PortInUseException (descends NetworkError) if another process has already bound the ip/port  
    389387 
    390       XXXException if there is already a tcpserversocket with the same IP and port. (Conrad: I don't think we care (what type of exception this is). This is a coding error, not something you write code to catch / deal with.) 
     388      PortInUseException if there is already a tcpserversocket with the same IP and port.  
    391389 
    392390      TypeError/ValueError if the IP or port number is invalid. 
     
    401399 
    402400   <Resource Consumption> 
    403       This call consumes an insocket and requires that the localport (if specified) is allowed. 
     401      This call consumes an insocket and requires that the localport is allowed. 
    404402          
    405403   <Returns>  
     
    418416Open a file, returning an object of the file type.  
    419417 
    420 Filenames may only be in the current directory and contain lowercase letters, numbers, the hyphen, underscore, and period character and may not be '.' or '..'.   There is no concept of a directory or a folder in repy.   
    421  
    422 '''Justin C: What is the allowed length of file names?''' 
    423  
    424 '''Conrad: FAT is limited to [http://en.wikipedia.org/wiki/FAT32 255 UTF-16 characters] (as is NTFS), ext2 to [http://en.wikipedia.org/wiki/Ext2 255 characters] (as are XFS and btrfs). Are there other filesystems we expect people to use (I don't think limiting to 8.3 is reasonable anymore)?''' 
    425  
    426 '''Justin C: Wikipedia has a list and the modern FSes seem to allow a minimum of 30 characters for a file name.   30 characters seems reasonable and gives more than 10^47^ possible file names.''' 
     418Filenames may only be in the current directory and contain lowercase letters, numbers, the hyphen, underscore, and period character and may not be '.' or '..'.   There is no concept of a directory or a folder in repy.  Filenames must be no more than 30 characters long. 
    427419 
    428420The writeable parameter determines whether the file handle is read-only or capable of both reading and writing. Neither mode truncates the file on open. 
     
    454446        FileNotFoundError if the file does not exist. 
    455447 
    456         XXXException if the file has incorrect permissions (I don't think it's reasonable to expect repy programs to catch this and choose a different filename, but I recognize it may have merit -- what do others think?) 
     448        An internal error will cause the program to terminate if the file has incorrect permissions or similar errors occur. 
    457449 
    458450     <Side Effects>