![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __del__ |
def | __getstate__ |
def | __init__ |
def | fileno |
def | bind |
def | listen |
def | accept |
def | connect |
def | connect_ex |
def | getpeername |
def | getsockname |
def | recv |
def | recv_into |
def | recvfrom |
def | recvfrom_into |
def | send |
def | sendall |
def | sendto |
def | setblocking |
def | settimeout |
def | gettimeout |
def | setsockopt |
def | getsockopt |
def | shutdown |
def | close |
Public Attributes | |
family | |
type | |
proto | |
socket([family[, type[, proto]]]) -> socket object Open a socket of the given type. The family argument specifies the address family; it defaults to AF_INET. The type argument specifies whether this is a stream (SOCK_STREAM, this is the default) or datagram (SOCK_DGRAM) socket. The protocol argument defaults to 0, specifying the default protocol. Keyword arguments are accepted. A socket object represents one endpoint of a network connection.
def google.appengine.api.remote_socket._remote_socket.socket.accept | ( | self | ) |
accept() -> (socket object, address info) Wait for an incoming connection. Return a new socket representing the connection, and the address of the client. For IP sockets, the address info is a pair (hostaddr, port).
def google.appengine.api.remote_socket._remote_socket.socket.bind | ( | self, | |
address | |||
) |
bind(address) Bind the socket to a local address. For IP sockets, the address is a pair (host, port); the host must refer to the local host. For raw packet sockets the address is a tuple (ifname, proto [,pkttype [,hatype]])
def google.appengine.api.remote_socket._remote_socket.socket.close | ( | self | ) |
close() Close the socket. It cannot be used after this call.
def google.appengine.api.remote_socket._remote_socket.socket.connect | ( | self, | |
address, | |||
_hostname_hint = None |
|||
) |
connect(address) Connect the socket to a remote address. For IP sockets, the address is a pair (host, port).
def google.appengine.api.remote_socket._remote_socket.socket.connect_ex | ( | self, | |
address | |||
) |
connect_ex(address) -> errno This is like connect(address), but returns an error code (the errno value) instead of raising an exception when an error occurs.
def google.appengine.api.remote_socket._remote_socket.socket.fileno | ( | self | ) |
fileno() -> integer Return the integer file descriptor of the socket.
def google.appengine.api.remote_socket._remote_socket.socket.getpeername | ( | self | ) |
getpeername() -> address info Return the address of the remote endpoint. For IP sockets, the address info is a pair (hostaddr, port).
def google.appengine.api.remote_socket._remote_socket.socket.getsockname | ( | self | ) |
getsockname() -> address info Return the address of the local endpoint. For IP sockets, the address info is a pair (hostaddr, port).
def google.appengine.api.remote_socket._remote_socket.socket.getsockopt | ( | self, | |
level, | |||
option, | |||
buffersize = 0 |
|||
) |
getsockopt(level, option[, buffersize]) -> value Get a socket option. See the Unix manual for level and option. If a nonzero buffersize argument is given, the return value is a string of that length; otherwise it is an integer.
def google.appengine.api.remote_socket._remote_socket.socket.gettimeout | ( | self | ) |
gettimeout() -> timeout Returns the timeout in floating seconds associated with socket operations. A timeout of None indicates that timeouts on socket operations are disabled.
def google.appengine.api.remote_socket._remote_socket.socket.listen | ( | self, | |
backlog | |||
) |
listen(backlog) Enable a server to accept connections. The backlog argument must be at least 1; it specifies the number of unaccepted connection that the system will allow before refusing new connections.
def google.appengine.api.remote_socket._remote_socket.socket.recv | ( | self, | |
buffersize, | |||
flags = 0 |
|||
) |
recv(buffersize[, flags]) -> data Receive up to buffersize bytes from the socket. For the optional flags argument, see the Unix manual. When no data is available, block until at least one byte is available or until the remote end is closed. When the remote end is closed and all data is read, return the empty string.
def google.appengine.api.remote_socket._remote_socket.socket.recv_into | ( | self, | |
buf, | |||
nbytes = 0 , |
|||
flags = 0 |
|||
) |
recv_into(buffer, [nbytes[, flags]]) -> nbytes_read A version of recv() that stores its data into a buffer rather than creating a new string. Receive up to buffersize bytes from the socket. If buffersize is not specified (or 0), receive up to the size available in the given buffer. See recv() for documentation about the flags.
def google.appengine.api.remote_socket._remote_socket.socket.recvfrom | ( | self, | |
buffersize, | |||
flags = 0 |
|||
) |
recvfrom(buffersize[, flags]) -> (data, address info) Like recv(buffersize, flags) but also return the sender's address info.
def google.appengine.api.remote_socket._remote_socket.socket.recvfrom_into | ( | self, | |
buffer, | |||
nbytes = 0 , |
|||
flags = 0 |
|||
) |
recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info) Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.
def google.appengine.api.remote_socket._remote_socket.socket.send | ( | self, | |
data, | |||
flags = 0 |
|||
) |
send(data[, flags]) -> count Send a data string to the socket. For the optional flags argument, see the Unix manual. Return the number of bytes sent; this may be less than len(data) if the network is busy.
def google.appengine.api.remote_socket._remote_socket.socket.sendall | ( | self, | |
data, | |||
flags = 0 |
|||
) |
sendall(data[, flags]) Send a data string to the socket. For the optional flags argument, see the Unix manual. This calls send() repeatedly until all data is sent. If an error occurs, it's impossible to tell how much data has been sent.
def google.appengine.api.remote_socket._remote_socket.socket.sendto | ( | self, | |
data, | |||
args | |||
) |
sendto(data[, flags], address) -> count Like send(data, flags) but allows specifying the destination address. For IP sockets, the address is a pair (hostaddr, port).
def google.appengine.api.remote_socket._remote_socket.socket.setblocking | ( | self, | |
block | |||
) |
setblocking(flag) Set the socket to blocking (flag is true) or non-blocking (false). setblocking(True) is equivalent to settimeout(None); setblocking(False) is equivalent to settimeout(0.0).
def google.appengine.api.remote_socket._remote_socket.socket.setsockopt | ( | self, | |
level, | |||
option, | |||
value | |||
) |
setsockopt(level, option, value) Set a socket option. See the Unix manual for level and option. The value argument can either be an integer or a string.
def google.appengine.api.remote_socket._remote_socket.socket.settimeout | ( | self, | |
timeout | |||
) |
settimeout(timeout) Set a timeout on socket operations. 'timeout' can be a float, giving in seconds, or None. Setting a timeout of None disables the timeout feature and is equivalent to setblocking(1). Setting a timeout of zero is the same as setblocking(0).
def google.appengine.api.remote_socket._remote_socket.socket.shutdown | ( | self, | |
flag | |||
) |
shutdown(flag) Shut down the reading side of the socket (flag == SHUT_RD), the writing side of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).