INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Connection-oriented stream socket used as server"
project: "Visual Eiffel Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: sockets
class ESL_SERVER_SOCKET
inherit

ESL_STREAM_SOCKET
rename
close as close_
export
{NONE}
close_
end

ESL_STREAM_SOCKET
redefine
close
select
close
end
creation

make,
make_bound,
make_listening
feature -- Creation

make_listening (local_addr: ESL_INTERNET_HOST_ADDRESS; local_port: INTEGER; backlog: INTEGER)
-- Create a new socket, bind it to the `local_addr' & `local_port'
-- and listen for incoming connections
ensure
is_valid: is_valid
is_bound: is_bound
is_listening: is_listening
feature -- Queries

is_listening: BOOLEAN
feature -- Operations

listen (backlog: INTEGER)
-- Establish the socket to listen for incoming connections
-- `backlog' is the maximum length of pending connections queue
require
is_valid: is_valid
is_bound: is_bound
unconnected: not is_connected
ensure
is_listening: is_listening

accept: ESL_STREAM_SOCKET
-- Accept a connection and return a socket ready for communication
require
is_valid: is_valid
is_listening: is_listening

close
-- Close the socket
end -- class ESL_SERVER_SOCKET

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES