Merge pull request #10 from oligot/reuseaddr
Socket: reuse address to resolve the error "address already in use"
This commit is contained in:
@@ -8,6 +8,9 @@ class
|
||||
|
||||
inherit
|
||||
NETWORK_STREAM_SOCKET
|
||||
redefine
|
||||
make
|
||||
end
|
||||
|
||||
create
|
||||
make_server_by_address_and_port,
|
||||
@@ -18,6 +21,13 @@ create {NETWORK_STREAM_SOCKET}
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Create a network stream socket.
|
||||
do
|
||||
Precursor
|
||||
set_reuse_address
|
||||
end
|
||||
|
||||
make_server_by_address_and_port (an_address: INET_ADDRESS; a_port: INTEGER)
|
||||
-- Create server socket on `an_address' and `a_port'.
|
||||
require
|
||||
|
||||
Reference in New Issue
Block a user