OwlCyberSecurity - MANAGER
Edit File: sendmsg.pyc
� `��ac @` s� d Z d d l m Z m Z d d l m Z d d l m Z d d d d g Z e s� d d l m Z m Z d d l m Z m Z e d d d g 7Z n d d l m Z m Z e d d d d g � Z g d d � Z d d d d � Z d � Z d S( s/ sendmsg(2) and recvmsg(2) support for Python. i ( t absolute_importt division( t namedtuple( t _PY3t sendmsgt recvmsgt getSocketFamilyt SCM_RIGHTS( t send1msgt recv1msg( t getsockfamR R R R ( R t CMSG_SPACEt RecievedMessaget datat ancillaryt flagsc C` s9 t r | j | g | | � St | j � | | | � Sd S( s� Send a message on a socket. @param socket: The socket to send the message on. @type socket: L{socket.socket} @param data: Bytes to write to the socket. @type data: bytes @param ancillary: Extra data to send over the socket outside of the normal datagram or stream mechanism. By default no ancillary data is sent. @type ancillary: C{list} of C{tuple} of C{int}, C{int}, and C{bytes}. @param flags: Flags to affect how the message is sent. See the C{MSG_} constants in the sendmsg(2) manual page. By default no flags are set. @type flags: C{int} @return: The return value of the underlying syscall, if it succeeds. N( R R R t fileno( t socketR R R ( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/sendmsg.pyR s i i c C` sq t r4 | j | t | � | � d d !\ } } } n$ t | j � | | | � \ } } } t d | d | d | � S( s� Receive a message on a socket. @param socket: The socket to receive the message on. @type socket: L{socket.socket} @param maxSize: The maximum number of bytes to receive from the socket using the datagram or stream mechanism. The default maximum is 8192. @type maxSize: L{int} @param cmsgSize: The maximum number of bytes to receive from the socket outside of the normal datagram or stream mechanism. The default maximum is 4096. @type cmsgSize: L{int} @param flags: Flags to affect how the message is sent. See the C{MSG_} constants in the sendmsg(2) manual page. By default no flags are set. @type flags: L{int} @return: A named 3-tuple of the bytes received using the datagram/stream mechanism, a L{list} of L{tuple}s giving ancillary received data, and flags as an L{int} describing the data received. i i R R R ( R R R R R R ( R t maxSizet cmsgSizeR R R ( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/sendmsg.pyR 6 s (!c C` s! t r | j St | j � � Sd S( s� Return the family of the given socket. @param socket: The socket to get the family of. @type socket: L{socket.socket} @rtype: L{int} N( R t familyR R ( R ( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/sendmsg.pyR ^ s N( t __doc__t __future__R R t collectionsR t twisted.python.compatR t __all__t twisted.python._sendmsgR R R R R R R R R R ( ( ( sY /opt/cpanel-ccs/.develop/virtualenv/lib/python2.7/site-packages/twisted/python/sendmsg.pyt <module> s (