mactcp -- Python library reference



Next: macspeech Prev: macostools Up: Macintosh Specific Services Top: Top

14.9. Built-in Module mactcp

This module provides an interface to the Macintosh TCP/IP driver MacTCP.macdnr which provides an interface to the name-server (allowing you to translate hostnames to ip-addresses), a module MACTCP which has symbolic names for constants constants used by MacTCP and a wrapper module socket which mimics the UNIX socket interface (as far as possible). It may not be available in all Mac Python versions.

A complete description of the MacTCP interface can be found in the Apple MacTCP API documentation.

MTU () -- function of module mactcp
Return the Maximum Transmit Unit (the packet size) of the network interface.
IPAddr () -- function of module mactcp
Return the 32-bit integer IP address of the network interface.
NetMask () -- function of module mactcp
Return the 32-bit integer network mask of the interface.
TCPCreate (size) -- function of module mactcp
Create a TCP Stream object. size is the size of the receive buffer, 4096 is suggested by various sources.
UDPCreate (size, port) -- function of module mactcp
Create a UDP stream object. size is the size of the receive buffer (and, hence, the size of the biggest datagram you can receive on this port). port is the UDP port number you want to receive datagrams on, a value of zero will make MacTCP select a free port.

Menu

TCP Stream Objects
TCP Status Objects
UDP Stream Objects


Next: macspeech Prev: macostools Up: Macintosh Specific Services Top: Top