indexing
	description: "A unix socket address."
	status: "See notice at end of class"
	date: "$Date$"
	revision: "$Revision$"

class interface
	UNIX_SOCKET_ADDRESS

create 

	make
			-- Create an unix socket address.

	make_from_path (a_path: like path)
			-- Create an unix socket address from a path.

feature -- Initialization

	make
			-- Create an unix socket address.

	make_from_path (a_path: like path)
			-- Create an unix socket address from a path.
	
feature -- Access

	socket_address: SPECIAL [CHARACTER]
			-- Special data zone
			-- (from TO_SPECIAL)
	
feature -- Measurement

	count: INTEGER
			-- Size of address
			-- (from SOCKET_ADDRESS)
	
feature -- Comparison

	is_equal (other: like Current): BOOLEAN
			-- Is current address equal to other?
			-- (from SOCKET_ADDRESS)
		require -- from ANY
			other_not_void: other /= void
		ensure -- from ANY
			symmetric: Result implies other.is_equal (Current)
			consistent: standard_is_equal (other) implies Result
	
feature -- Status report

	address_in_use: BOOLEAN
			-- Address is in use by another socket.
			-- (from SOCKET_RESOURCES)

	address_not_readable: BOOLEAN
			-- Unreadable address
			-- (from SOCKET_RESOURCES)

	already_bound: BOOLEAN
			-- Socket has already been bound.
			-- (from SOCKET_RESOURCES)

	bad_socket_handle: BOOLEAN
			-- Socket descriptor is bad.
			-- (from SOCKET_RESOURCES)

	connect_in_progress: BOOLEAN
			-- Call to connect returned on a non-blocking socket.
			-- (from SOCKET_RESOURCES)

	connection_refused: BOOLEAN
			-- Connection is refused (possibly due to security).
			-- (from SOCKET_RESOURCES)

	dtable_full: BOOLEAN
			-- Descriptor table is full
			-- (from SOCKET_RESOURCES)

	error: STRING
			-- Output a related error message.
			-- (from SOCKET_RESOURCES)

	error_number: INTEGER
			-- Returned error number
			-- (from SOCKET_RESOURCES)

	expired_socket: BOOLEAN
			-- Socket connection has expired.
			-- (from SOCKET_RESOURCES)

	family: INTEGER
			-- Get the socket family of socket address.
			-- (from SOCKET_ADDRESS)

	invalid_address: BOOLEAN
			-- Address is not valid.
			-- (from SOCKET_RESOURCES)

	invalid_socket_handle: BOOLEAN
			-- Socket descriptor is not valid.
			-- (from SOCKET_RESOURCES)

	network: BOOLEAN
			-- Socket failed due to network problems.
			-- (from SOCKET_RESOURCES)

	no_buffers: BOOLEAN
			-- No more buffers available
			-- (from SOCKET_RESOURCES)

	no_permission: BOOLEAN
			-- No permission is given to user for this socket.
			-- (from SOCKET_RESOURCES)

	not_connected: BOOLEAN
			-- Socket is not connect.
			-- (from SOCKET_RESOURCES)

	path: STRING
			-- Path of the socket address file

	protected_address: BOOLEAN
			-- No access to this address is allowed.
			-- (from SOCKET_RESOURCES)

	protocol_not_supported: BOOLEAN
			-- Protocol is not supported on this platform.
			-- (from SOCKET_RESOURCES)

	socket_family_not_supported: BOOLEAN
			-- Requested family is not supported.
			-- (from SOCKET_RESOURCES)

	socket_in_use: BOOLEAN
			-- Socket is already in use.
			-- (from SOCKET_RESOURCES)

	socket_ok: BOOLEAN
			-- No error
			-- (from SOCKET_RESOURCES)

	socket_would_block: BOOLEAN
			-- Call to read, write, etc would have blocked.
			-- (from SOCKET_RESOURCES)

	zero_option: BOOLEAN
			-- No options provided
			-- (from SOCKET_RESOURCES)
	
feature -- Status setting

	set_family (f: INTEGER)
			-- Set socket address family to f.
			-- (from SOCKET_ADDRESS)
	
feature -- Duplication

	copy (other: like Current)
			-- Reinitialize by copying characters of other.
			-- (This is also used by clone.)
			-- (from SOCKET_ADDRESS)
		require -- from ANY
			other_not_void: other /= void
			type_identity: same_type (other)
		ensure -- from ANY
			is_equal: is_equal (other)
		ensure then -- from SOCKET_ADDRESS
			new_result_count: count = other.count or else count = address_size
	
feature -- Externals: flags for send, sendto recv and recvfrom socket calls

	c_msgdontroute: INTEGER
			-- Do not route message
			-- (from SOCKET_RESOURCES)

	c_oobmsg: INTEGER
			-- Out of bound message
			-- (from SOCKET_RESOURCES)

	c_peekmsg: INTEGER
			-- Peek message
			-- (from SOCKET_RESOURCES)
	
feature -- Initalization

	socket_address_make
			-- Make space available for address size.
			-- (from SOCKET_ADDRESS)
	
feature -- Status settings

	set_path (p: STRING)
			-- Set socket path to p.
	
invariant

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class UNIX_SOCKET_ADDRESS