Lines Matching refs:to
9 # Unless required by applicable law or agreed to in writing, software
81 Data is padded to an integer multiple of CMSG_ALIGNTO.
110 def Bind(s, to):
112 ret = libc.bind(s.fileno(), to.CPointer(), len(to))
117 def Connect(s, to):
119 ret = libc.connect(s.fileno(), to.CPointer(), len(to))
124 def Sendmsg(s, to, data, control, flags):
129 to: An address tuple, or a SockaddrIn[6] struct. Becomes msg->msg_name.
130 data: A string, the data to write. Goes into msg->msg_iov.
140 # Create ctypes buffers and pointers from our structures. We need to hang on
141 # to the underlying Python objects, because we don't want them to be garbage
142 # collected and freed while we have C pointers to them.
145 if to:
146 if isinstance(to, tuple):
147 to = Sockaddr(to)
148 msg_name = to.CPointer()
149 msg_namelen = len(to)
154 # Convert the data to a data buffer and a struct iovec pointing at it.