indexing description: "[ Singleton representing the network subsytem. Use EM_SHARED_SUBSYSTEMS to access this class. ]" date: "$Date$" revision: "$Revision$" class EM_NETWORK_SUBSYSTEM inherit EM_SUBSYSTEM SDL_NET_FUNCTIONS_EXTERNAL export {NONE} all end NET2_FUNCTIONS_EXTERNAL export {NONE} all end create {EM_SHARED_NETWORK_SUBSYSTEM} make feature {NONE} -- Initialization make is do is_enabled := False create sockets.make ensure not_enabled: not is_enabled end feature -- Access sockets: EM_SOCKETS -- Global sockets feature -- Status report is_enabled: BOOLEAN -- Is the networkiong subsystem enabled? feature -- Subsystem management enable is -- Enable EiffelMedia network subsystem. do base_enable if sdlnet_init_external = -1 then Error_handler.raise_error (Error_handler.Em_error_init_sdlnet, []) elseif net2_init_external = -1 then Error_handler.raise_error (Error_handler.Em_error_init_net2, []) else is_enabled := True end ensure then enabled: is_enabled end disable is -- Disable EiffelMedia networkiong subsystem. do sdlnet_quit_external net2_quit_external is_enabled := False base_disable end end