Most methods of KStreamSocket objects are identical to the
socket methods of the same names; these are not described here. Refer
to the socket module documentation for
information on standard socket behavior.
The methods described here are either new with this class or have
- accept ()
Like the normal socket accept() method, but returns a
Kerberized socket instead. The connect has already been authenticated
once this method returns. This method does block while performing the
Kerberos authentication handshake.
- bind (address)
The socket address address must be a (host,
port) pair. If host is the empty string (''), it
will be replaced with the result of socket.gethostname() to
ensure that the getsockname() method returns the same address
as the getpeername() method of the remote connection. This is
needed to make Kerberos work properly without making too many
assumptions about system configuration.
- connect (address)
Raises KSocketError; use kconnect() instead.
- get_remote_principal ()
Return the Kerberos principal for the remote side of the connection.
If the socket is not connected, KSocketError is raised.
- kconnect (sprinc, port[, options])
Connect to a remote server. The server principal, given by
sprinc, must be a service principal as returned by
krb5.get_svc_principal(). If type(sprinc) is
not krb5.PrincipalType, a TypeError exception is
raised. If it does not have the required service information,
ValueError is raised. Application request options can be
passed in options if desired. Once the connection is
established, the Kerberos authenticaion handshake is performed; this
operation can block.