passenger 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data/DEVELOPERS.TXT +2 -0
- data/INSTALL +3 -1
- data/LICENSE +19 -355
- data/NEWS +3 -0
- data/README +11 -4
- data/Rakefile +435 -236
- data/bin/passenger-config +20 -14
- data/bin/passenger-install-apache2-module +67 -201
- data/bin/passenger-install-nginx-module +477 -0
- data/bin/passenger-make-enterprisey +17 -12
- data/bin/passenger-memory-stats +33 -23
- data/bin/passenger-spawn-server +17 -12
- data/bin/passenger-status +18 -13
- data/bin/passenger-stress-test +17 -12
- data/doc/{Users guide.html → Users guide Apache.html } +79 -61
- data/doc/{Users guide.txt → Users guide Apache.txt } +43 -939
- data/doc/Users guide Nginx.html +2276 -0
- data/doc/Users guide Nginx.txt +776 -0
- data/doc/cxxapi/ApplicationPoolServer_8h-source.html +9 -4
- data/doc/cxxapi/ApplicationPool_8h-source.html +9 -4
- data/doc/cxxapi/Application_8h-source.html +26 -21
- data/doc/cxxapi/Bucket_8h-source.html +54 -44
- data/doc/cxxapi/CachedFileStat_8h-source.html +9 -4
- data/doc/cxxapi/Configuration_8h-source.html +357 -339
- data/doc/cxxapi/DirectoryMapper_8h-source.html +294 -280
- data/doc/cxxapi/DummySpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/Exceptions_8h-source.html +9 -4
- data/doc/cxxapi/FileChecker_8h-source.html +9 -4
- data/doc/cxxapi/Hooks_8h-source.html +50 -40
- data/doc/cxxapi/Logging_8h-source.html +9 -4
- data/doc/cxxapi/MessageChannel_8h-source.html +20 -15
- data/doc/cxxapi/PoolOptions_8h-source.html +10 -5
- data/doc/cxxapi/SpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/StandardApplicationPool_8h-source.html +10 -5
- data/doc/cxxapi/SystemTime_8h-source.html +9 -4
- data/doc/cxxapi/Utils_8h-source.html +242 -214
- data/doc/cxxapi/annotated.html +4 -28
- data/doc/cxxapi/classClient-members.html +4 -4
- data/doc/cxxapi/classClient.html +14 -11
- data/doc/cxxapi/classHooks-members.html +4 -5
- data/doc/cxxapi/classHooks.html +26 -24
- data/doc/cxxapi/classPassenger_1_1Application-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1Application.html +40 -37
- data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +95 -92
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +26 -23
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +17 -17
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +139 -136
- data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +13 -10
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BusyException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +4 -5
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +45 -43
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +13 -10
- data/doc/cxxapi/classPassenger_1_1FileChecker-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileChecker.html +22 -19
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1IOException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +228 -225
- data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1RuntimeException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +50 -47
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +73 -70
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemException.html +17 -14
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemTime-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemTime.html +14 -11
- data/doc/cxxapi/classes.html +35 -0
- data/doc/cxxapi/definitions_8h-source.html +9 -4
- data/doc/cxxapi/doxygen.css +311 -303
- data/doc/cxxapi/files.html +9 -18
- data/doc/cxxapi/functions.html +5 -224
- data/doc/cxxapi/functions_func.html +5 -185
- data/doc/cxxapi/functions_type.html +4 -4
- data/doc/cxxapi/functions_vars.html +4 -4
- data/doc/cxxapi/graph_legend.dot +19 -19
- data/doc/cxxapi/graph_legend.html +5 -5
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Configuration.html +11 -13
- data/doc/cxxapi/group__Configuration.png +0 -0
- data/doc/cxxapi/group__Core.html +10 -12
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +5 -7
- data/doc/cxxapi/group__Hooks.html +5 -7
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +5 -624
- data/doc/cxxapi/hierarchy.html +6 -6
- data/doc/cxxapi/inherit__graph__0.map +1 -1
- data/doc/cxxapi/inherit__graph__0.md5 +1 -1
- data/doc/cxxapi/inherit__graph__0.png +0 -0
- data/doc/cxxapi/inherit__graph__1.map +1 -1
- data/doc/cxxapi/inherit__graph__1.md5 +1 -1
- data/doc/cxxapi/inherit__graph__1.png +0 -0
- data/doc/cxxapi/inherit__graph__10.map +1 -1
- data/doc/cxxapi/inherit__graph__10.md5 +1 -1
- data/doc/cxxapi/inherit__graph__10.png +0 -0
- data/doc/cxxapi/inherit__graph__11.map +1 -1
- data/doc/cxxapi/inherit__graph__11.md5 +1 -1
- data/doc/cxxapi/inherit__graph__11.png +0 -0
- data/doc/cxxapi/inherit__graph__12.map +1 -1
- data/doc/cxxapi/inherit__graph__12.md5 +1 -1
- data/doc/cxxapi/inherit__graph__12.png +0 -0
- data/doc/cxxapi/inherit__graph__13.map +1 -2
- data/doc/cxxapi/inherit__graph__13.md5 +1 -1
- data/doc/cxxapi/inherit__graph__13.png +0 -0
- data/doc/cxxapi/inherit__graph__14.map +2 -1
- data/doc/cxxapi/inherit__graph__14.md5 +1 -1
- data/doc/cxxapi/inherit__graph__14.png +0 -0
- data/doc/cxxapi/inherit__graph__15.map +1 -1
- data/doc/cxxapi/inherit__graph__15.md5 +1 -1
- data/doc/cxxapi/inherit__graph__15.png +0 -0
- data/doc/cxxapi/inherit__graph__16.map +1 -1
- data/doc/cxxapi/inherit__graph__16.md5 +1 -1
- data/doc/cxxapi/inherit__graph__16.png +0 -0
- data/doc/cxxapi/inherit__graph__17.map +1 -1
- data/doc/cxxapi/inherit__graph__17.md5 +1 -1
- data/doc/cxxapi/inherit__graph__17.png +0 -0
- data/doc/cxxapi/inherit__graph__18.map +1 -1
- data/doc/cxxapi/inherit__graph__18.md5 +1 -1
- data/doc/cxxapi/inherit__graph__18.png +0 -0
- data/doc/cxxapi/inherit__graph__19.map +1 -1
- data/doc/cxxapi/inherit__graph__19.md5 +1 -1
- data/doc/cxxapi/inherit__graph__19.png +0 -0
- data/doc/cxxapi/inherit__graph__2.map +1 -1
- data/doc/cxxapi/inherit__graph__2.md5 +1 -1
- data/doc/cxxapi/inherit__graph__2.png +0 -0
- data/doc/cxxapi/inherit__graph__20.map +2 -2
- data/doc/cxxapi/inherit__graph__20.md5 +1 -1
- data/doc/cxxapi/inherit__graph__20.png +0 -0
- data/doc/cxxapi/inherit__graph__21.map +1 -1
- data/doc/cxxapi/inherit__graph__21.md5 +1 -1
- data/doc/cxxapi/inherit__graph__21.png +0 -0
- data/doc/cxxapi/inherit__graph__3.map +1 -1
- data/doc/cxxapi/inherit__graph__3.md5 +1 -1
- data/doc/cxxapi/inherit__graph__3.png +0 -0
- data/doc/cxxapi/inherit__graph__4.map +1 -1
- data/doc/cxxapi/inherit__graph__4.md5 +1 -1
- data/doc/cxxapi/inherit__graph__4.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +1 -2
- data/doc/cxxapi/inherit__graph__5.md5 +1 -1
- data/doc/cxxapi/inherit__graph__5.png +0 -0
- data/doc/cxxapi/inherit__graph__6.map +2 -1
- data/doc/cxxapi/inherit__graph__6.md5 +1 -1
- data/doc/cxxapi/inherit__graph__6.png +0 -0
- data/doc/cxxapi/inherit__graph__7.map +1 -1
- data/doc/cxxapi/inherit__graph__7.md5 +1 -1
- data/doc/cxxapi/inherit__graph__7.png +0 -0
- data/doc/cxxapi/inherit__graph__8.map +1 -1
- data/doc/cxxapi/inherit__graph__8.md5 +1 -1
- data/doc/cxxapi/inherit__graph__8.png +0 -0
- data/doc/cxxapi/inherit__graph__9.map +1 -1
- data/doc/cxxapi/inherit__graph__9.md5 +1 -1
- data/doc/cxxapi/inherit__graph__9.png +0 -0
- data/doc/cxxapi/inherits.html +41 -41
- data/doc/cxxapi/main.html +4 -4
- data/doc/cxxapi/modules.html +4 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1AnythingToString.html +13 -10
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +5 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +16 -13
- data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1PoolOptions.html +63 -60
- data/doc/cxxapi/tabs.css +5 -2
- data/doc/cxxapi/tree.html +7 -81
- data/doc/rdoc/classes/ConditionVariable.html +59 -59
- data/doc/rdoc/classes/Exception.html +11 -11
- data/doc/rdoc/classes/GC.html +4 -4
- data/doc/rdoc/classes/IO.html +14 -14
- data/doc/rdoc/classes/PhusionPassenger.html +75 -20
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +125 -130
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +236 -236
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +213 -213
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +28 -28
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +91 -75
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Application.html +64 -64
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +34 -34
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +13 -13
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +30 -30
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +136 -136
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +24 -24
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +42 -42
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +55 -53
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +1 -1
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +25 -30
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +23 -23
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +116 -117
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +22 -22
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +118 -124
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +354 -354
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +9 -9
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +37 -37
- data/doc/rdoc/classes/PlatformInfo.html +282 -261
- data/doc/rdoc/classes/RakeExtensions.html +7 -7
- data/doc/rdoc/classes/Signal.html +26 -26
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/DEVELOPERS_TXT.html +6 -1
- data/doc/rdoc/files/README.html +15 -6
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +20 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +22 -12
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +27 -21
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +21 -12
- data/doc/rdoc/files/misc/rake/extensions_rb.html +21 -12
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +116 -112
- data/doc/users_guide_snippets/analysis_and_system_maintenance_tools.txt +144 -0
- data/doc/users_guide_snippets/appendix_a_about.txt +13 -0
- data/doc/users_guide_snippets/appendix_b_terminology.txt +63 -0
- data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +304 -0
- data/doc/users_guide_snippets/global_queueing_explained.txt +78 -0
- data/doc/users_guide_snippets/rackup_specifications.txt +75 -0
- data/doc/users_guide_snippets/rails_spawn_method.txt +48 -0
- data/doc/users_guide_snippets/tips.txt +173 -0
- data/ext/apache2/Bucket.cpp +17 -12
- data/ext/apache2/Bucket.h +17 -12
- data/ext/apache2/Configuration.cpp +17 -12
- data/ext/apache2/Configuration.h +27 -14
- data/ext/apache2/DirectoryMapper.h +21 -12
- data/ext/apache2/Hooks.cpp +67 -21
- data/ext/apache2/Hooks.h +17 -12
- data/ext/apache2/mod_passenger.c +17 -12
- data/ext/{apache2 → common}/Application.h +19 -14
- data/ext/{apache2 → common}/ApplicationPool.h +17 -12
- data/ext/{apache2 → common}/ApplicationPoolServer.h +18 -72
- data/ext/{apache2 → common}/ApplicationPoolServerExecutable.cpp +45 -104
- data/ext/common/ApplicationPoolStatusReporter.h +212 -0
- data/ext/{apache2 → common}/CachedFileStat.cpp +17 -12
- data/ext/{apache2 → common}/CachedFileStat.h +17 -12
- data/ext/{apache2 → common}/DummySpawnManager.h +17 -12
- data/ext/{apache2 → common}/Exceptions.h +17 -12
- data/ext/{apache2 → common}/FileChecker.h +17 -12
- data/ext/common/Logging.cpp +65 -0
- data/ext/{apache2 → common}/Logging.h +17 -12
- data/ext/{apache2 → common}/MessageChannel.h +17 -12
- data/ext/{apache2 → common}/PoolOptions.h +17 -12
- data/ext/{apache2 → common}/SpawnManager.h +17 -12
- data/ext/{apache2 → common}/StandardApplicationPool.h +17 -12
- data/ext/common/StaticString.h +147 -0
- data/ext/common/SystemTime.cpp +33 -0
- data/ext/{apache2 → common}/SystemTime.h +17 -12
- data/ext/{apache2 → common}/Utils.cpp +69 -12
- data/ext/{apache2 → common}/Utils.h +41 -12
- data/ext/nginx/Configuration.c +1091 -0
- data/ext/nginx/Configuration.h +71 -0
- data/ext/nginx/ContentHandler.c +1154 -0
- data/ext/nginx/ContentHandler.h +64 -0
- data/ext/nginx/HelperServer.cpp +857 -0
- data/ext/nginx/HttpStatusExtractor.h +161 -0
- data/ext/nginx/ScgiRequestParser.h +317 -0
- data/ext/nginx/StaticContentHandler.c +222 -0
- data/ext/nginx/StaticContentHandler.h +37 -0
- data/ext/nginx/config +41 -0
- data/ext/nginx/ngx_http_passenger_module.c +572 -0
- data/ext/nginx/ngx_http_passenger_module.h +72 -0
- data/ext/oxt/backtrace.cpp +8 -1
- data/ext/oxt/system_calls.cpp +40 -0
- data/ext/oxt/system_calls.hpp +14 -7
- data/ext/phusion_passenger/extconf.rb +17 -12
- data/ext/phusion_passenger/native_support.c +19 -12
- data/lib/phusion_passenger/abstract_installer.rb +196 -0
- data/lib/phusion_passenger/abstract_request_handler.rb +19 -24
- data/lib/phusion_passenger/abstract_server.rb +17 -12
- data/lib/phusion_passenger/abstract_server_collection.rb +17 -12
- data/lib/phusion_passenger/admin_tools.rb +23 -0
- data/lib/phusion_passenger/admin_tools/control_process.rb +39 -13
- data/lib/phusion_passenger/application.rb +17 -12
- data/lib/phusion_passenger/console_text_template.rb +17 -12
- data/lib/phusion_passenger/constants.rb +22 -11
- data/lib/phusion_passenger/dependencies.rb +47 -12
- data/lib/phusion_passenger/events.rb +17 -12
- data/lib/phusion_passenger/exceptions.rb +17 -12
- data/lib/phusion_passenger/html_template.rb +17 -12
- data/lib/phusion_passenger/message_channel.rb +17 -12
- data/lib/phusion_passenger/packaging.rb +39 -0
- data/lib/phusion_passenger/platform_info.rb +48 -22
- data/lib/phusion_passenger/rack/application_spawner.rb +22 -11
- data/lib/phusion_passenger/rack/request_handler.rb +21 -12
- data/lib/phusion_passenger/railz/application_spawner.rb +23 -23
- data/lib/phusion_passenger/railz/framework_spawner.rb +18 -14
- data/lib/phusion_passenger/railz/request_handler.rb +18 -11
- data/lib/phusion_passenger/simple_benchmarking.rb +17 -12
- data/lib/phusion_passenger/spawn_manager.rb +17 -20
- data/lib/phusion_passenger/templates/{apache_must_be_compiled_with_compatible_mpm.txt.erb → apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{apache2_config_snippets.txt.erb → apache2/config_snippets.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{deployment_example.txt.erb → apache2/deployment_example.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{no_write_permission_to_passenger_root.txt.erb → apache2/no_write_permission_to_passenger_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{possible_solutions_for_compilation_and_installation_problems.txt.erb → apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{run_installer_as_root.txt.erb → apache2/run_installer_as_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{welcome.txt.erb → apache2/welcome.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/nginx/ask_for_extra_configure_flags.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/cannot_write_to_dir.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets.txt.erb +17 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets_inserted.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/confirm_extra_configure_flags.txt.erb +5 -0
- data/lib/phusion_passenger/templates/nginx/deployment_example.txt.erb +22 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_downloaded.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_extracted.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb +21 -0
- data/lib/phusion_passenger/templates/nginx/run_installer_as_root.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/welcome.txt.erb +15 -0
- data/lib/phusion_passenger/utils.rb +20 -15
- data/lib/phusion_passenger/wsgi/application_spawner.rb +18 -11
- data/lib/phusion_passenger/wsgi/request_handler.py +23 -0
- data/misc/copy_boost_headers.rb +23 -0
- data/misc/find_owner_pipe_leaks.rb +18 -11
- data/misc/rake/cplusplus.rb +18 -11
- data/misc/rake/extensions.rb +21 -14
- data/misc/render_error_pages.rb +18 -11
- data/test/ApplicationPoolServerTest.cpp +1 -3
- data/test/ApplicationPoolServer_ApplicationPoolTest.cpp +1 -1
- data/test/CxxTestMain.cpp +19 -3
- data/test/HttpStatusExtractorTest.cpp +181 -0
- data/test/ScgiRequestParserTest.cpp +337 -0
- data/test/StaticStringTest.cpp +51 -0
- data/test/UtilsTest.cpp +32 -0
- data/test/config.yml.example +5 -0
- data/test/{integration_tests.rb → integration_tests/apache2_tests.rb} +7 -299
- data/test/integration_tests/hello_world_rack_spec.rb +36 -0
- data/test/integration_tests/hello_world_wsgi_spec.rb +41 -0
- data/test/integration_tests/mycook_spec.rb +192 -0
- data/test/integration_tests/nginx_tests.rb +98 -0
- data/test/ruby/rack/application_spawner_spec.rb +40 -0
- data/test/stub/nginx/koi-utf +109 -0
- data/test/stub/nginx/koi-win +103 -0
- data/test/stub/nginx/mime.types +70 -0
- data/test/stub/nginx/nginx.conf.erb +57 -0
- data/test/stub/nginx/win-utf +126 -0
- data/test/stub/rails_apps/mycook/app/controllers/uploads_controller.rb +4 -0
- data/test/stub/rails_apps/mycook/config/routes.rb +1 -1
- data/test/stub/wsgi/passenger_wsgi.pyc +0 -0
- data/test/support/Support.h +40 -0
- data/test/support/nginx_controller.rb +98 -0
- data/test/support/test_helper.rb +79 -0
- metadata +1091 -1028
- data/benchmark/DummyRequestHandler.cpp +0 -101
- data/ext/apache2/Logging.cpp +0 -60
- data/ext/apache2/SystemTime.cpp +0 -28
@@ -1,10 +1,10 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
2
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
3
3
|
<title>Passenger: Member List</title>
|
4
|
-
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
4
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
5
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
6
6
|
</head><body>
|
7
|
-
<!-- Generated by Doxygen 1.5.
|
7
|
+
<!-- Generated by Doxygen 1.5.8 -->
|
8
8
|
<div class="navigation" id="top">
|
9
9
|
<div class="tabs">
|
10
10
|
<ul>
|
@@ -43,8 +43,8 @@
|
|
43
43
|
<tr class="memlist"><td><a class="el" href="classPassenger_1_1MessageChannel.html#44e01a783c48abadeea0d915b9893bfb">writeScalar</a>(const string &str)</td><td><a class="el" href="classPassenger_1_1MessageChannel.html">Passenger::MessageChannel</a></td><td><code> [inline]</code></td></tr>
|
44
44
|
<tr class="memlist"><td><a class="el" href="classPassenger_1_1MessageChannel.html#80977020ef895f3ea790c5d28a333dda">writeScalar</a>(const char *data, unsigned int size)</td><td><a class="el" href="classPassenger_1_1MessageChannel.html">Passenger::MessageChannel</a></td><td><code> [inline]</code></td></tr>
|
45
45
|
</table></div>
|
46
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
46
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Apr 8 22:35:12 2009 for Passenger by
|
47
47
|
<a href="http://www.doxygen.org/index.html">
|
48
|
-
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.
|
48
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
49
49
|
</body>
|
50
50
|
</html>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
2
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
3
3
|
<title>Passenger: Passenger::MessageChannel Class Reference</title>
|
4
|
-
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
4
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
5
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
6
6
|
</head><body>
|
7
|
-
<!-- Generated by Doxygen 1.5.
|
7
|
+
<!-- Generated by Doxygen 1.5.8 -->
|
8
8
|
<div class="navigation" id="top">
|
9
9
|
<div class="tabs">
|
10
10
|
<ul>
|
@@ -28,39 +28,14 @@
|
|
28
28
|
<h1>Passenger::MessageChannel Class Reference<br>
|
29
29
|
<small>
|
30
30
|
[<a class="el" href="group__Support.html">Apache-independent support classes and function</a>]</small>
|
31
|
-
</h1><!-- doxytag: class="Passenger::MessageChannel"
|
31
|
+
</h1><!-- doxytag: class="Passenger::MessageChannel" -->Convenience class for I/O operations on file descriptors.
|
32
|
+
<a href="#_details">More...</a>
|
32
33
|
<p>
|
33
|
-
|
34
|
+
<code>#include <<a class="el" href="MessageChannel_8h-source.html">MessageChannel.h</a>></code>
|
34
35
|
<p>
|
35
|
-
<a href="classPassenger_1_1MessageChannel-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
36
|
-
Convenience class for I/O operations on file descriptors.
|
37
|
-
<p>
|
38
|
-
This class provides convenience methods for:<ul>
|
39
|
-
<li>sending and receiving raw data over a file descriptor.</li><li>sending and receiving messages over a file descriptor.</li><li>file descriptor passing over a Unix socket. All of these methods use exceptions for error reporting.</li></ul>
|
40
|
-
<p>
|
41
|
-
There are two kinds of messages:<ul>
|
42
|
-
<li>Array messages. These are just a list of strings, and the message itself has a specific length. The contained strings may not contain NUL characters (<code>'\0'</code>). Note that an array message must have at least one element.</li><li>Scalar messages. These are byte strings which may contain arbitrary binary data. Scalar messages also have a specific length. The protocol is designed to be low overhead, easy to implement and easy to parse.</li></ul>
|
43
|
-
<p>
|
44
|
-
<a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> is to be wrapped around a file descriptor. For example: <div class="fragment"><pre class="fragment"> <span class="keywordtype">int</span> p[2];
|
45
|
-
pipe(p);
|
46
|
-
<a class="code" href="classPassenger_1_1MessageChannel.html#73e7c9a8e421d29558838176aff02ca4" title="Construct a new MessageChannel with no underlying file descriptor.">MessageChannel</a> channel1(p[0]);
|
47
|
-
<a class="code" href="classPassenger_1_1MessageChannel.html#73e7c9a8e421d29558838176aff02ca4" title="Construct a new MessageChannel with no underlying file descriptor.">MessageChannel</a> channel2(p[1]);
|
48
|
-
|
49
|
-
<span class="comment">// Send an array message.</span>
|
50
|
-
channel2.write(<span class="stringliteral">"hello"</span>, <span class="stringliteral">"world !!"</span>, NULL);
|
51
|
-
list<string> args;
|
52
|
-
channel1.read(args); <span class="comment">// args now contains { "hello", "world !!" }</span>
|
53
36
|
|
54
|
-
|
55
|
-
|
56
|
-
<span class="keywordtype">string</span> str;
|
57
|
-
channel1.readScalar(str);
|
58
|
-
</pre></div><p>
|
59
|
-
The life time of a <a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> is independent from that of the wrapped file descriptor. If a <a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> object is destroyed, the file descriptor is not automatically closed. Call <a class="el" href="classPassenger_1_1MessageChannel.html#06309e208fc5e10642a2e9bbe0f351eb" title="Close the underlying file descriptor.">close()</a> if you want to close the file descriptor.<p>
|
60
|
-
<dl class="note" compact><dt><b>Note:</b></dt><dd>I/O operations are not buffered. <p>
|
61
|
-
Be careful with mixing the sending/receiving of array messages, scalar messages and file descriptors. If you send a collection of any of these in a specific order, then the receiving side must receive them in the exact some order. So suppose you first send a message, then a file descriptor, then a scalar, then the receiving side must first receive a message, then a file descriptor, then a scalar. If the receiving side does things in the wrong order then bad things will happen. <p>
|
62
|
-
<a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> is not thread-safe, but is reentrant. </dd></dl>
|
63
|
-
<table border="0" cellpadding="0" cellspacing="0">
|
37
|
+
<p>
|
38
|
+
<a href="classPassenger_1_1MessageChannel-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
64
39
|
<tr><td></td></tr>
|
65
40
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
66
41
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1MessageChannel.html#73e7c9a8e421d29558838176aff02ca4">MessageChannel</a> ()</td></tr>
|
@@ -73,7 +48,7 @@ Be careful with mixing the sending/receiving of array messages, scalar messages
|
|
73
48
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1MessageChannel.html#06309e208fc5e10642a2e9bbe0f351eb">close</a> ()</td></tr>
|
74
49
|
|
75
50
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Close the underlying file descriptor. <a href="#06309e208fc5e10642a2e9bbe0f351eb"></a><br></td></tr>
|
76
|
-
<tr><td class="memTemplParams" nowrap colspan="2">template<typename StringArrayType, typename StringArrayConstIteratorType> </td></tr>
|
51
|
+
<tr><td class="memTemplParams" nowrap colspan="2">template<typename StringArrayType , typename StringArrayConstIteratorType > </td></tr>
|
77
52
|
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d">write</a> (const StringArrayType &args)</td></tr>
|
78
53
|
|
79
54
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send an array message, which consists of the given elements, over the underlying file descriptor. <a href="#150f68bc47e060dcc6ca35bee047914d"></a><br></td></tr>
|
@@ -120,6 +95,34 @@ Be careful with mixing the sending/receiving of array messages, scalar messages
|
|
120
95
|
|
121
96
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the timeout value for writing data to this channel. <a href="#77c5d7c47f387cf43992ebeb14e3c6c7"></a><br></td></tr>
|
122
97
|
</table>
|
98
|
+
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
99
|
+
Convenience class for I/O operations on file descriptors.
|
100
|
+
<p>
|
101
|
+
This class provides convenience methods for:<ul>
|
102
|
+
<li>sending and receiving raw data over a file descriptor.</li><li>sending and receiving messages over a file descriptor.</li><li>file descriptor passing over a Unix socket. All of these methods use exceptions for error reporting.</li></ul>
|
103
|
+
<p>
|
104
|
+
There are two kinds of messages:<ul>
|
105
|
+
<li>Array messages. These are just a list of strings, and the message itself has a specific length. The contained strings may not contain NUL characters (<code>'\0'</code>). Note that an array message must have at least one element.</li><li>Scalar messages. These are byte strings which may contain arbitrary binary data. Scalar messages also have a specific length. The protocol is designed to be low overhead, easy to implement and easy to parse.</li></ul>
|
106
|
+
<p>
|
107
|
+
<a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> is to be wrapped around a file descriptor. For example: <div class="fragment"><pre class="fragment"> <span class="keywordtype">int</span> p[2];
|
108
|
+
pipe(p);
|
109
|
+
<a class="code" href="classPassenger_1_1MessageChannel.html#73e7c9a8e421d29558838176aff02ca4" title="Construct a new MessageChannel with no underlying file descriptor.">MessageChannel</a> channel1(p[0]);
|
110
|
+
<a class="code" href="classPassenger_1_1MessageChannel.html#73e7c9a8e421d29558838176aff02ca4" title="Construct a new MessageChannel with no underlying file descriptor.">MessageChannel</a> channel2(p[1]);
|
111
|
+
|
112
|
+
<span class="comment">// Send an array message.</span>
|
113
|
+
channel2.write(<span class="stringliteral">"hello"</span>, <span class="stringliteral">"world !!"</span>, NULL);
|
114
|
+
list<string> args;
|
115
|
+
channel1.read(args); <span class="comment">// args now contains { "hello", "world !!" }</span>
|
116
|
+
|
117
|
+
<span class="comment">// Send a scalar message.</span>
|
118
|
+
channel2.writeScalar(<span class="stringliteral">"some long string which can contain arbitrary binary data"</span>);
|
119
|
+
<span class="keywordtype">string</span> str;
|
120
|
+
channel1.readScalar(str);
|
121
|
+
</pre></div><p>
|
122
|
+
The life time of a <a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> is independent from that of the wrapped file descriptor. If a <a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> object is destroyed, the file descriptor is not automatically closed. Call <a class="el" href="classPassenger_1_1MessageChannel.html#06309e208fc5e10642a2e9bbe0f351eb" title="Close the underlying file descriptor.">close()</a> if you want to close the file descriptor.<p>
|
123
|
+
<dl class="note" compact><dt><b>Note:</b></dt><dd>I/O operations are not buffered. <p>
|
124
|
+
Be careful with mixing the sending/receiving of array messages, scalar messages and file descriptors. If you send a collection of any of these in a specific order, then the receiving side must receive them in the exact some order. So suppose you first send a message, then a file descriptor, then a scalar, then the receiving side must first receive a message, then a file descriptor, then a scalar. If the receiving side does things in the wrong order then bad things will happen. <p>
|
125
|
+
<a class="el" href="classPassenger_1_1MessageChannel.html" title="Convenience class for I/O operations on file descriptors.">MessageChannel</a> is not thread-safe, but is reentrant. </dd></dl>
|
123
126
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
124
127
|
<a class="anchor" name="73e7c9a8e421d29558838176aff02ca4"></a><!-- doxytag: member="Passenger::MessageChannel::MessageChannel" ref="73e7c9a8e421d29558838176aff02ca4" args="()" -->
|
125
128
|
<div class="memitem">
|
@@ -130,7 +133,7 @@ Be careful with mixing the sending/receiving of array messages, scalar messages
|
|
130
133
|
<td>(</td>
|
131
134
|
<td class="paramname"> </td>
|
132
135
|
<td> ) </td>
|
133
|
-
<td
|
136
|
+
<td><code> [inline]</code></td>
|
134
137
|
</tr>
|
135
138
|
</table>
|
136
139
|
</div>
|
@@ -152,7 +155,7 @@ Thus the resulting <a class="el" href="classPassenger_1_1MessageChannel.html" ti
|
|
152
155
|
<td>(</td>
|
153
156
|
<td class="paramname"> </td>
|
154
157
|
<td> ) </td>
|
155
|
-
<td
|
158
|
+
<td><code> [inline]</code></td>
|
156
159
|
</tr>
|
157
160
|
</table>
|
158
161
|
</div>
|
@@ -171,571 +174,571 @@ If this method is called multiple times, the file descriptor will only be closed
|
|
171
174
|
|
172
175
|
</div>
|
173
176
|
</div><p>
|
174
|
-
<a class="anchor" name="
|
177
|
+
<a class="anchor" name="129659b60d1a663337873d2af944431e"></a><!-- doxytag: member="Passenger::MessageChannel::read" ref="129659b60d1a663337873d2af944431e" args="(vector< string > &args)" -->
|
175
178
|
<div class="memitem">
|
176
179
|
<div class="memproto">
|
177
|
-
<div class="memtemplate">
|
178
|
-
template<typename StringArrayType, typename StringArrayConstIteratorType> </div>
|
179
180
|
<table class="memname">
|
180
181
|
<tr>
|
181
|
-
<td class="memname">
|
182
|
+
<td class="memname">bool Passenger::MessageChannel::read </td>
|
182
183
|
<td>(</td>
|
183
|
-
<td class="paramtype">
|
184
|
+
<td class="paramtype">vector< string > & </td>
|
184
185
|
<td class="paramname"> <em>args</em> </td>
|
185
186
|
<td> ) </td>
|
186
|
-
<td
|
187
|
+
<td><code> [inline]</code></td>
|
187
188
|
</tr>
|
188
189
|
</table>
|
189
190
|
</div>
|
190
191
|
<div class="memdoc">
|
191
192
|
|
192
193
|
<p>
|
193
|
-
|
194
|
+
Read an array message from the underlying file descriptor.
|
194
195
|
<p>
|
195
196
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
196
197
|
<table border="0" cellspacing="2" cellpadding="0">
|
197
|
-
<tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>
|
198
|
+
<tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>The message will be put in this variable. </td></tr>
|
198
199
|
</table>
|
199
200
|
</dl>
|
201
|
+
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether end-of-file has been reached. If so, then the contents of <code>args</code> will be undefined. </dd></dl>
|
200
202
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
201
203
|
<table border="0" cellspacing="2" cellpadding="0">
|
202
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
204
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>If an error occured while receiving the message. </td></tr>
|
203
205
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
204
206
|
</table>
|
205
207
|
</dl>
|
206
|
-
<dl class="
|
207
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d" title="Send an array message, which consists of the given elements, over the underlying...">write</a>(const char *, ...) </dd></dl>
|
208
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d" title="Send an array message, which consists of the given elements, over the underlying...">write()</a> </dd></dl>
|
208
209
|
|
209
210
|
</div>
|
210
211
|
</div><p>
|
211
|
-
<a class="anchor" name="
|
212
|
+
<a class="anchor" name="1561b7e4a0f4d39ea431f456e5655488"></a><!-- doxytag: member="Passenger::MessageChannel::readFileDescriptor" ref="1561b7e4a0f4d39ea431f456e5655488" args="()" -->
|
212
213
|
<div class="memitem">
|
213
214
|
<div class="memproto">
|
214
215
|
<table class="memname">
|
215
216
|
<tr>
|
216
|
-
<td class="memname">
|
217
|
+
<td class="memname">int Passenger::MessageChannel::readFileDescriptor </td>
|
217
218
|
<td>(</td>
|
218
|
-
<td class="
|
219
|
-
<td class="paramname"> <em>args</em> </td>
|
219
|
+
<td class="paramname"> </td>
|
220
220
|
<td> ) </td>
|
221
|
-
<td
|
221
|
+
<td><code> [inline]</code></td>
|
222
222
|
</tr>
|
223
223
|
</table>
|
224
224
|
</div>
|
225
225
|
<div class="memdoc">
|
226
226
|
|
227
227
|
<p>
|
228
|
-
|
228
|
+
Receive a file descriptor, which had been passed over the underlying file descriptor.
|
229
229
|
<p>
|
230
|
-
<dl compact><dt><b>
|
231
|
-
<table border="0" cellspacing="2" cellpadding="0">
|
232
|
-
<tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>The message elements. </td></tr>
|
233
|
-
</table>
|
234
|
-
</dl>
|
230
|
+
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The passed file descriptor. </dd></dl>
|
235
231
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
236
232
|
<table border="0" cellspacing="2" cellpadding="0">
|
237
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
233
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>If something went wrong during the receiving of a file descriptor. Perhaps the underlying file descriptor isn't a Unix socket. </td></tr>
|
234
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a></em> </td><td>Whatever was received doesn't seem to be a file descriptor. </td></tr>
|
238
235
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
239
236
|
</table>
|
240
237
|
</dl>
|
241
|
-
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd>None of the message elements may contain a NUL character (<code>'\0'</code>). </dd></dl>
|
242
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d" title="Send an array message, which consists of the given elements, over the underlying...">write</a>(const char *, ...) </dd></dl>
|
243
238
|
|
244
239
|
</div>
|
245
240
|
</div><p>
|
246
|
-
<a class="anchor" name="
|
241
|
+
<a class="anchor" name="cd1d1bd1cc787784c8b54f5471fff479"></a><!-- doxytag: member="Passenger::MessageChannel::readRaw" ref="cd1d1bd1cc787784c8b54f5471fff479" args="(void *buf, unsigned int size)" -->
|
247
242
|
<div class="memitem">
|
248
243
|
<div class="memproto">
|
249
244
|
<table class="memname">
|
250
245
|
<tr>
|
251
|
-
<td class="memname">
|
246
|
+
<td class="memname">bool Passenger::MessageChannel::readRaw </td>
|
252
247
|
<td>(</td>
|
253
|
-
<td class="paramtype">
|
254
|
-
<td class="paramname"> <em>
|
255
|
-
|
256
|
-
|
248
|
+
<td class="paramtype">void * </td>
|
249
|
+
<td class="paramname"> <em>buf</em>, </td>
|
250
|
+
</tr>
|
251
|
+
<tr>
|
252
|
+
<td class="paramkey"></td>
|
253
|
+
<td></td>
|
254
|
+
<td class="paramtype">unsigned int </td>
|
255
|
+
<td class="paramname"> <em>size</em></td><td> </td>
|
256
|
+
</tr>
|
257
|
+
<tr>
|
258
|
+
<td></td>
|
259
|
+
<td>)</td>
|
260
|
+
<td></td><td></td><td><code> [inline]</code></td>
|
257
261
|
</tr>
|
258
262
|
</table>
|
259
263
|
</div>
|
260
264
|
<div class="memdoc">
|
261
265
|
|
262
266
|
<p>
|
263
|
-
|
267
|
+
Read exactly <code>size</code> bytes of data from the underlying file descriptor, and put the result in <code>buf</code>.
|
264
268
|
<p>
|
269
|
+
If end-of-file has been reached, or if end-of-file was encountered before <code>size</code> bytes have been read, then <code>false</code> will be returned. Otherwise (i.e. if the read was successful), <code>true</code> will be returned.<p>
|
265
270
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
266
271
|
<table border="0" cellspacing="2" cellpadding="0">
|
267
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
272
|
+
<tr><td valign="top"></td><td valign="top"><em>buf</em> </td><td>The buffer to place the read data in. This buffer must be at least <code>size</code> bytes long. </td></tr>
|
273
|
+
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The number of bytes to read. </td></tr>
|
268
274
|
</table>
|
269
275
|
</dl>
|
276
|
+
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether reading was successful or whether EOF was reached. </dd></dl>
|
277
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd>buf != NULL </dd></dl>
|
270
278
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
271
279
|
<table border="0" cellspacing="2" cellpadding="0">
|
272
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
280
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>Something went wrong during reading. </td></tr>
|
273
281
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
274
282
|
</table>
|
275
283
|
</dl>
|
276
|
-
<dl class="
|
277
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d" title="Send an array message, which consists of the given elements, over the underlying...">write</a>(const char *, ...) </dd></dl>
|
284
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#069314e4c7e1fe8c8ab36e16d2cc5fef" title="Send a block of data over the underlying file descriptor.">writeRaw()</a> </dd></dl>
|
278
285
|
|
279
286
|
</div>
|
280
287
|
</div><p>
|
281
|
-
<a class="anchor" name="
|
288
|
+
<a class="anchor" name="4ce6a0e751b5e3563bee583c231569bc"></a><!-- doxytag: member="Passenger::MessageChannel::readScalar" ref="4ce6a0e751b5e3563bee583c231569bc" args="(string &output)" -->
|
282
289
|
<div class="memitem">
|
283
290
|
<div class="memproto">
|
284
291
|
<table class="memname">
|
285
292
|
<tr>
|
286
|
-
<td class="memname">
|
293
|
+
<td class="memname">bool Passenger::MessageChannel::readScalar </td>
|
287
294
|
<td>(</td>
|
288
|
-
<td class="paramtype">
|
289
|
-
<td class="paramname"> <em>
|
290
|
-
|
291
|
-
|
292
|
-
<td class="paramkey"></td>
|
293
|
-
<td></td>
|
294
|
-
<td class="paramtype"> </td>
|
295
|
-
<td class="paramname"> <em>...</em></td><td> </td>
|
296
|
-
</tr>
|
297
|
-
<tr>
|
298
|
-
<td></td>
|
299
|
-
<td>)</td>
|
300
|
-
<td></td><td></td><td width="100%"><code> [inline]</code></td>
|
295
|
+
<td class="paramtype">string & </td>
|
296
|
+
<td class="paramname"> <em>output</em> </td>
|
297
|
+
<td> ) </td>
|
298
|
+
<td><code> [inline]</code></td>
|
301
299
|
</tr>
|
302
300
|
</table>
|
303
301
|
</div>
|
304
302
|
<div class="memdoc">
|
305
303
|
|
306
304
|
<p>
|
307
|
-
|
305
|
+
Read a scalar message from the underlying file descriptor.
|
308
306
|
<p>
|
309
307
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
310
308
|
<table border="0" cellspacing="2" cellpadding="0">
|
311
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
312
|
-
<tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>Other elements of the message. These *must* be strings, i.e. of type char*. It is also required to terminate this list with a NULL. </td></tr>
|
309
|
+
<tr><td valign="top"></td><td valign="top"><em>output</em> </td><td>The message will be put in here. </td></tr>
|
313
310
|
</table>
|
314
311
|
</dl>
|
312
|
+
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether end-of-file was reached during reading. </dd></dl>
|
315
313
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
316
314
|
<table border="0" cellspacing="2" cellpadding="0">
|
317
315
|
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
318
316
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
319
317
|
</table>
|
320
318
|
</dl>
|
321
|
-
<dl class="
|
322
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#9ad7a978cf8409e01ab2f0a2b6be5a0a" title="Send an array message, which consists of the given elements, over the underlying...">write(const list<string> &)</a> </dd></dl>
|
319
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#44e01a783c48abadeea0d915b9893bfb" title="Send a scalar message over the underlying file descriptor.">writeScalar()</a> </dd></dl>
|
323
320
|
|
324
321
|
</div>
|
325
322
|
</div><p>
|
326
|
-
<a class="anchor" name="
|
323
|
+
<a class="anchor" name="eb69bffbbb148c9bc8662e20b416c4e2"></a><!-- doxytag: member="Passenger::MessageChannel::setReadTimeout" ref="eb69bffbbb148c9bc8662e20b416c4e2" args="(unsigned int msec)" -->
|
327
324
|
<div class="memitem">
|
328
325
|
<div class="memproto">
|
329
326
|
<table class="memname">
|
330
327
|
<tr>
|
331
|
-
<td class="memname">void Passenger::MessageChannel::
|
328
|
+
<td class="memname">void Passenger::MessageChannel::setReadTimeout </td>
|
332
329
|
<td>(</td>
|
333
|
-
<td class="paramtype">
|
334
|
-
<td class="paramname"> <em>
|
330
|
+
<td class="paramtype">unsigned int </td>
|
331
|
+
<td class="paramname"> <em>msec</em> </td>
|
335
332
|
<td> ) </td>
|
336
|
-
<td
|
333
|
+
<td><code> [inline]</code></td>
|
337
334
|
</tr>
|
338
335
|
</table>
|
339
336
|
</div>
|
340
337
|
<div class="memdoc">
|
341
338
|
|
342
339
|
<p>
|
343
|
-
|
340
|
+
Set the timeout value for reading data from this channel.
|
344
341
|
<p>
|
342
|
+
If no data can be read within the timeout period, then a <a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a> will be thrown by one of the read methods, with error code EAGAIN or EWOULDBLOCK.<p>
|
345
343
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
346
344
|
<table border="0" cellspacing="2" cellpadding="0">
|
347
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
345
|
+
<tr><td valign="top"></td><td valign="top"><em>msec</em> </td><td>The timeout, in milliseconds. If 0 is given, there will be no timeout. </td></tr>
|
348
346
|
</table>
|
349
347
|
</dl>
|
350
348
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
351
349
|
<table border="0" cellspacing="2" cellpadding="0">
|
352
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
353
|
-
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
350
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>Cannot set the timeout. </td></tr>
|
354
351
|
</table>
|
355
352
|
</dl>
|
356
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#4ce6a0e751b5e3563bee583c231569bc" title="Read a scalar message from the underlying file descriptor.">readScalar()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#80977020ef895f3ea790c5d28a333dda" title="Send a scalar message over the underlying file descriptor.">writeScalar(const char *, unsigned int)</a> </dd></dl>
|
357
353
|
|
358
354
|
</div>
|
359
355
|
</div><p>
|
360
|
-
<a class="anchor" name="
|
356
|
+
<a class="anchor" name="77c5d7c47f387cf43992ebeb14e3c6c7"></a><!-- doxytag: member="Passenger::MessageChannel::setWriteTimeout" ref="77c5d7c47f387cf43992ebeb14e3c6c7" args="(unsigned int msec)" -->
|
361
357
|
<div class="memitem">
|
362
358
|
<div class="memproto">
|
363
359
|
<table class="memname">
|
364
360
|
<tr>
|
365
|
-
<td class="memname">void Passenger::MessageChannel::
|
361
|
+
<td class="memname">void Passenger::MessageChannel::setWriteTimeout </td>
|
366
362
|
<td>(</td>
|
367
|
-
<td class="paramtype">const char * </td>
|
368
|
-
<td class="paramname"> <em>data</em>, </td>
|
369
|
-
</tr>
|
370
|
-
<tr>
|
371
|
-
<td class="paramkey"></td>
|
372
|
-
<td></td>
|
373
363
|
<td class="paramtype">unsigned int </td>
|
374
|
-
<td class="paramname"> <em>
|
375
|
-
|
376
|
-
|
377
|
-
<td></td>
|
378
|
-
<td>)</td>
|
379
|
-
<td></td><td></td><td width="100%"><code> [inline]</code></td>
|
364
|
+
<td class="paramname"> <em>msec</em> </td>
|
365
|
+
<td> ) </td>
|
366
|
+
<td><code> [inline]</code></td>
|
380
367
|
</tr>
|
381
368
|
</table>
|
382
369
|
</div>
|
383
370
|
<div class="memdoc">
|
384
371
|
|
385
372
|
<p>
|
386
|
-
|
373
|
+
Set the timeout value for writing data to this channel.
|
387
374
|
<p>
|
375
|
+
If no data can be written within the timeout period, then a <a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a> will be thrown, with error code EAGAIN or EWOULDBLOCK.<p>
|
388
376
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
389
377
|
<table border="0" cellspacing="2" cellpadding="0">
|
390
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
391
|
-
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The number of bytes in <code>data</code>. </td></tr>
|
378
|
+
<tr><td valign="top"></td><td valign="top"><em>msec</em> </td><td>The timeout, in milliseconds. If 0 is given, there will be no timeout. </td></tr>
|
392
379
|
</table>
|
393
380
|
</dl>
|
394
|
-
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd><code>data != NULL</code> </dd></dl>
|
395
381
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
396
382
|
<table border="0" cellspacing="2" cellpadding="0">
|
397
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
398
|
-
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
383
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>Cannot set the timeout. </td></tr>
|
399
384
|
</table>
|
400
385
|
</dl>
|
401
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#4ce6a0e751b5e3563bee583c231569bc" title="Read a scalar message from the underlying file descriptor.">readScalar()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#44e01a783c48abadeea0d915b9893bfb" title="Send a scalar message over the underlying file descriptor.">writeScalar(const string &)</a> </dd></dl>
|
402
386
|
|
403
387
|
</div>
|
404
388
|
</div><p>
|
405
|
-
<a class="anchor" name="
|
389
|
+
<a class="anchor" name="12cce3364023eacbe4fe09006cf3d38d"></a><!-- doxytag: member="Passenger::MessageChannel::write" ref="12cce3364023eacbe4fe09006cf3d38d" args="(const char *name,...)" -->
|
406
390
|
<div class="memitem">
|
407
391
|
<div class="memproto">
|
408
392
|
<table class="memname">
|
409
393
|
<tr>
|
410
|
-
<td class="memname">void Passenger::MessageChannel::
|
394
|
+
<td class="memname">void Passenger::MessageChannel::write </td>
|
411
395
|
<td>(</td>
|
412
396
|
<td class="paramtype">const char * </td>
|
413
|
-
<td class="paramname"> <em>
|
397
|
+
<td class="paramname"> <em>name</em>, </td>
|
414
398
|
</tr>
|
415
399
|
<tr>
|
416
400
|
<td class="paramkey"></td>
|
417
401
|
<td></td>
|
418
|
-
<td class="paramtype"
|
419
|
-
<td class="paramname"> <em
|
402
|
+
<td class="paramtype"> </td>
|
403
|
+
<td class="paramname"> <em>...</em></td><td> </td>
|
420
404
|
</tr>
|
421
405
|
<tr>
|
422
406
|
<td></td>
|
423
407
|
<td>)</td>
|
424
|
-
<td></td><td></td><td
|
408
|
+
<td></td><td></td><td><code> [inline]</code></td>
|
425
409
|
</tr>
|
426
410
|
</table>
|
427
411
|
</div>
|
428
412
|
<div class="memdoc">
|
429
413
|
|
430
414
|
<p>
|
431
|
-
Send
|
415
|
+
Send an array message, which consists of the given strings, over the underlying file descriptor.
|
432
416
|
<p>
|
433
|
-
This method blocks until everything is sent.<p>
|
434
417
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
435
418
|
<table border="0" cellspacing="2" cellpadding="0">
|
436
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
437
|
-
<tr><td valign="top"></td><td valign="top"><em
|
419
|
+
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The first element of the message to send. </td></tr>
|
420
|
+
<tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>Other elements of the message. These *must* be strings, i.e. of type char*. It is also required to terminate this list with a NULL. </td></tr>
|
438
421
|
</table>
|
439
422
|
</dl>
|
440
|
-
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd><code>data != NULL</code> </dd></dl>
|
441
423
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
442
424
|
<table border="0" cellspacing="2" cellpadding="0">
|
443
425
|
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
444
426
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
445
427
|
</table>
|
446
428
|
</dl>
|
447
|
-
<dl class="
|
429
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd>None of the message elements may contain a NUL character (<code>'\0'</code>). </dd></dl>
|
430
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#9ad7a978cf8409e01ab2f0a2b6be5a0a" title="Send an array message, which consists of the given elements, over the underlying...">write(const list<string> &)</a> </dd></dl>
|
448
431
|
|
449
432
|
</div>
|
450
433
|
</div><p>
|
451
|
-
<a class="anchor" name="
|
434
|
+
<a class="anchor" name="6a9bc5d72715cb7ba0e437c8851ef487"></a><!-- doxytag: member="Passenger::MessageChannel::write" ref="6a9bc5d72715cb7ba0e437c8851ef487" args="(const vector< string > &args)" -->
|
452
435
|
<div class="memitem">
|
453
436
|
<div class="memproto">
|
454
437
|
<table class="memname">
|
455
438
|
<tr>
|
456
|
-
<td class="memname">void Passenger::MessageChannel::
|
439
|
+
<td class="memname">void Passenger::MessageChannel::write </td>
|
457
440
|
<td>(</td>
|
458
|
-
<td class="paramtype">const string & </td>
|
459
|
-
<td class="paramname"> <em>
|
441
|
+
<td class="paramtype">const vector< string > & </td>
|
442
|
+
<td class="paramname"> <em>args</em> </td>
|
460
443
|
<td> ) </td>
|
461
|
-
<td
|
444
|
+
<td><code> [inline]</code></td>
|
462
445
|
</tr>
|
463
446
|
</table>
|
464
447
|
</div>
|
465
448
|
<div class="memdoc">
|
466
449
|
|
467
450
|
<p>
|
468
|
-
Send
|
451
|
+
Send an array message, which consists of the given elements, over the underlying file descriptor.
|
469
452
|
<p>
|
470
|
-
This method blocks until everything is sent.<p>
|
471
453
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
472
454
|
<table border="0" cellspacing="2" cellpadding="0">
|
473
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
455
|
+
<tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>The message elements. </td></tr>
|
474
456
|
</table>
|
475
457
|
</dl>
|
476
|
-
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd><code>data != NULL</code> </dd></dl>
|
477
458
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
478
459
|
<table border="0" cellspacing="2" cellpadding="0">
|
479
460
|
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
480
461
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
481
462
|
</table>
|
482
463
|
</dl>
|
464
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd>None of the message elements may contain a NUL character (<code>'\0'</code>). </dd></dl>
|
465
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d" title="Send an array message, which consists of the given elements, over the underlying...">write</a>(const char *, ...) </dd></dl>
|
483
466
|
|
484
467
|
</div>
|
485
468
|
</div><p>
|
486
|
-
<a class="anchor" name="
|
469
|
+
<a class="anchor" name="9ad7a978cf8409e01ab2f0a2b6be5a0a"></a><!-- doxytag: member="Passenger::MessageChannel::write" ref="9ad7a978cf8409e01ab2f0a2b6be5a0a" args="(const list< string > &args)" -->
|
487
470
|
<div class="memitem">
|
488
471
|
<div class="memproto">
|
489
472
|
<table class="memname">
|
490
473
|
<tr>
|
491
|
-
<td class="memname">void Passenger::MessageChannel::
|
474
|
+
<td class="memname">void Passenger::MessageChannel::write </td>
|
492
475
|
<td>(</td>
|
493
|
-
<td class="paramtype">
|
494
|
-
<td class="paramname"> <em>
|
476
|
+
<td class="paramtype">const list< string > & </td>
|
477
|
+
<td class="paramname"> <em>args</em> </td>
|
495
478
|
<td> ) </td>
|
496
|
-
<td
|
479
|
+
<td><code> [inline]</code></td>
|
497
480
|
</tr>
|
498
481
|
</table>
|
499
482
|
</div>
|
500
483
|
<div class="memdoc">
|
501
484
|
|
502
485
|
<p>
|
503
|
-
|
486
|
+
Send an array message, which consists of the given elements, over the underlying file descriptor.
|
504
487
|
<p>
|
505
|
-
This only works if the underlying file descriptor is a Unix socket.<p>
|
506
488
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
507
489
|
<table border="0" cellspacing="2" cellpadding="0">
|
508
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
490
|
+
<tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>The message elements. </td></tr>
|
509
491
|
</table>
|
510
492
|
</dl>
|
511
493
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
512
494
|
<table border="0" cellspacing="2" cellpadding="0">
|
513
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
495
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
514
496
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
515
497
|
</table>
|
516
498
|
</dl>
|
517
|
-
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd
|
518
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#
|
499
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd>None of the message elements may contain a NUL character (<code>'\0'</code>). </dd></dl>
|
500
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d" title="Send an array message, which consists of the given elements, over the underlying...">write</a>(const char *, ...) </dd></dl>
|
519
501
|
|
520
502
|
</div>
|
521
503
|
</div><p>
|
522
|
-
<a class="anchor" name="
|
504
|
+
<a class="anchor" name="150f68bc47e060dcc6ca35bee047914d"></a><!-- doxytag: member="Passenger::MessageChannel::write" ref="150f68bc47e060dcc6ca35bee047914d" args="(const StringArrayType &args)" -->
|
523
505
|
<div class="memitem">
|
524
506
|
<div class="memproto">
|
507
|
+
<div class="memtemplate">
|
508
|
+
template<typename StringArrayType , typename StringArrayConstIteratorType > </div>
|
525
509
|
<table class="memname">
|
526
510
|
<tr>
|
527
|
-
<td class="memname">
|
511
|
+
<td class="memname">void Passenger::MessageChannel::write </td>
|
528
512
|
<td>(</td>
|
529
|
-
<td class="paramtype">
|
513
|
+
<td class="paramtype">const StringArrayType & </td>
|
530
514
|
<td class="paramname"> <em>args</em> </td>
|
531
515
|
<td> ) </td>
|
532
|
-
<td
|
516
|
+
<td><code> [inline]</code></td>
|
533
517
|
</tr>
|
534
518
|
</table>
|
535
519
|
</div>
|
536
520
|
<div class="memdoc">
|
537
521
|
|
538
522
|
<p>
|
539
|
-
|
523
|
+
Send an array message, which consists of the given elements, over the underlying file descriptor.
|
540
524
|
<p>
|
541
525
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
542
526
|
<table border="0" cellspacing="2" cellpadding="0">
|
543
|
-
<tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>
|
527
|
+
<tr><td valign="top"></td><td valign="top"><em>args</em> </td><td>An object which contains the message elements. This object must support STL-style iteration, and each iterator must have an std::string as value. Use the StringArrayType and StringArrayConstIteratorType template parameters to specify the exact type names. </td></tr>
|
544
528
|
</table>
|
545
529
|
</dl>
|
546
|
-
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether end-of-file has been reached. If so, then the contents of <code>args</code> will be undefined. </dd></dl>
|
547
530
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
548
531
|
<table border="0" cellspacing="2" cellpadding="0">
|
549
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
532
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
550
533
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
551
534
|
</table>
|
552
535
|
</dl>
|
553
|
-
<dl class="
|
536
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd>None of the message elements may contain a NUL character (<code>'\0'</code>). </dd></dl>
|
537
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#129659b60d1a663337873d2af944431e" title="Read an array message from the underlying file descriptor.">read()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#150f68bc47e060dcc6ca35bee047914d" title="Send an array message, which consists of the given elements, over the underlying...">write</a>(const char *, ...) </dd></dl>
|
554
538
|
|
555
539
|
</div>
|
556
540
|
</div><p>
|
557
|
-
<a class="anchor" name="
|
541
|
+
<a class="anchor" name="73e3f3cda384c085a2af0e820ccd3e98"></a><!-- doxytag: member="Passenger::MessageChannel::writeFileDescriptor" ref="73e3f3cda384c085a2af0e820ccd3e98" args="(int fileDescriptor)" -->
|
558
542
|
<div class="memitem">
|
559
543
|
<div class="memproto">
|
560
544
|
<table class="memname">
|
561
545
|
<tr>
|
562
|
-
<td class="memname">
|
546
|
+
<td class="memname">void Passenger::MessageChannel::writeFileDescriptor </td>
|
563
547
|
<td>(</td>
|
564
|
-
<td class="paramtype">
|
565
|
-
<td class="paramname"> <em>
|
548
|
+
<td class="paramtype">int </td>
|
549
|
+
<td class="paramname"> <em>fileDescriptor</em> </td>
|
566
550
|
<td> ) </td>
|
567
|
-
<td
|
551
|
+
<td><code> [inline]</code></td>
|
568
552
|
</tr>
|
569
553
|
</table>
|
570
554
|
</div>
|
571
555
|
<div class="memdoc">
|
572
556
|
|
573
557
|
<p>
|
574
|
-
|
558
|
+
Pass a file descriptor.
|
575
559
|
<p>
|
560
|
+
This only works if the underlying file descriptor is a Unix socket.<p>
|
576
561
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
577
562
|
<table border="0" cellspacing="2" cellpadding="0">
|
578
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
563
|
+
<tr><td valign="top"></td><td valign="top"><em>fileDescriptor</em> </td><td>The file descriptor to pass. </td></tr>
|
579
564
|
</table>
|
580
565
|
</dl>
|
581
|
-
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Whether end-of-file was reached during reading. </dd></dl>
|
582
566
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
583
567
|
<table border="0" cellspacing="2" cellpadding="0">
|
584
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
568
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>Something went wrong during file descriptor passing. </td></tr>
|
585
569
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
586
570
|
</table>
|
587
571
|
</dl>
|
588
|
-
<dl class="
|
572
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd><code>fileDescriptor >= 0</code> </dd></dl>
|
573
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#1561b7e4a0f4d39ea431f456e5655488" title="Receive a file descriptor, which had been passed over the underlying file descriptor...">readFileDescriptor()</a> </dd></dl>
|
589
574
|
|
590
575
|
</div>
|
591
576
|
</div><p>
|
592
|
-
<a class="anchor" name="
|
577
|
+
<a class="anchor" name="cfa38f4f0e22ec16350b8cc159e8e364"></a><!-- doxytag: member="Passenger::MessageChannel::writeRaw" ref="cfa38f4f0e22ec16350b8cc159e8e364" args="(const string &data)" -->
|
593
578
|
<div class="memitem">
|
594
579
|
<div class="memproto">
|
595
580
|
<table class="memname">
|
596
581
|
<tr>
|
597
|
-
<td class="memname">
|
582
|
+
<td class="memname">void Passenger::MessageChannel::writeRaw </td>
|
598
583
|
<td>(</td>
|
599
|
-
<td class="paramtype">
|
600
|
-
<td class="paramname"> <em>
|
601
|
-
|
602
|
-
|
603
|
-
<td class="paramkey"></td>
|
604
|
-
<td></td>
|
605
|
-
<td class="paramtype">unsigned int </td>
|
606
|
-
<td class="paramname"> <em>size</em></td><td> </td>
|
607
|
-
</tr>
|
608
|
-
<tr>
|
609
|
-
<td></td>
|
610
|
-
<td>)</td>
|
611
|
-
<td></td><td></td><td width="100%"><code> [inline]</code></td>
|
584
|
+
<td class="paramtype">const string & </td>
|
585
|
+
<td class="paramname"> <em>data</em> </td>
|
586
|
+
<td> ) </td>
|
587
|
+
<td><code> [inline]</code></td>
|
612
588
|
</tr>
|
613
589
|
</table>
|
614
590
|
</div>
|
615
591
|
<div class="memdoc">
|
616
592
|
|
617
593
|
<p>
|
618
|
-
|
594
|
+
Send a block of data over the underlying file descriptor.
|
619
595
|
<p>
|
620
|
-
|
596
|
+
This method blocks until everything is sent.<p>
|
621
597
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
622
598
|
<table border="0" cellspacing="2" cellpadding="0">
|
623
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
624
|
-
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The number of bytes to read. </td></tr>
|
599
|
+
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>The data to send. </td></tr>
|
625
600
|
</table>
|
626
601
|
</dl>
|
627
|
-
<dl class="
|
628
|
-
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd>buf != NULL </dd></dl>
|
602
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd><code>data != NULL</code> </dd></dl>
|
629
603
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
630
604
|
<table border="0" cellspacing="2" cellpadding="0">
|
631
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
605
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
632
606
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
633
607
|
</table>
|
634
608
|
</dl>
|
635
|
-
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#069314e4c7e1fe8c8ab36e16d2cc5fef" title="Send a block of data over the underlying file descriptor.">writeRaw()</a> </dd></dl>
|
636
609
|
|
637
610
|
</div>
|
638
611
|
</div><p>
|
639
|
-
<a class="anchor" name="
|
612
|
+
<a class="anchor" name="069314e4c7e1fe8c8ab36e16d2cc5fef"></a><!-- doxytag: member="Passenger::MessageChannel::writeRaw" ref="069314e4c7e1fe8c8ab36e16d2cc5fef" args="(const char *data, unsigned int size)" -->
|
640
613
|
<div class="memitem">
|
641
614
|
<div class="memproto">
|
642
615
|
<table class="memname">
|
643
616
|
<tr>
|
644
|
-
<td class="memname">
|
617
|
+
<td class="memname">void Passenger::MessageChannel::writeRaw </td>
|
645
618
|
<td>(</td>
|
646
|
-
<td class="
|
647
|
-
<td
|
648
|
-
|
619
|
+
<td class="paramtype">const char * </td>
|
620
|
+
<td class="paramname"> <em>data</em>, </td>
|
621
|
+
</tr>
|
622
|
+
<tr>
|
623
|
+
<td class="paramkey"></td>
|
624
|
+
<td></td>
|
625
|
+
<td class="paramtype">unsigned int </td>
|
626
|
+
<td class="paramname"> <em>size</em></td><td> </td>
|
627
|
+
</tr>
|
628
|
+
<tr>
|
629
|
+
<td></td>
|
630
|
+
<td>)</td>
|
631
|
+
<td></td><td></td><td><code> [inline]</code></td>
|
649
632
|
</tr>
|
650
633
|
</table>
|
651
634
|
</div>
|
652
635
|
<div class="memdoc">
|
653
636
|
|
654
637
|
<p>
|
655
|
-
|
638
|
+
Send a block of data over the underlying file descriptor.
|
656
639
|
<p>
|
657
|
-
|
640
|
+
This method blocks until everything is sent.<p>
|
641
|
+
<dl compact><dt><b>Parameters:</b></dt><dd>
|
642
|
+
<table border="0" cellspacing="2" cellpadding="0">
|
643
|
+
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>The data to send. </td></tr>
|
644
|
+
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The number of bytes in <code>data</code>. </td></tr>
|
645
|
+
</table>
|
646
|
+
</dl>
|
647
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd><code>data != NULL</code> </dd></dl>
|
658
648
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
659
649
|
<table border="0" cellspacing="2" cellpadding="0">
|
660
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
661
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1IOException.html" title="Represents an error that occured during an I/O operation.">IOException</a></em> </td><td>Whatever was received doesn't seem to be a file descriptor. </td></tr>
|
650
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
662
651
|
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
663
652
|
</table>
|
664
653
|
</dl>
|
654
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#cd1d1bd1cc787784c8b54f5471fff479" title="Read exactly size bytes of data from the underlying file descriptor, and put the...">readRaw()</a> </dd></dl>
|
665
655
|
|
666
656
|
</div>
|
667
657
|
</div><p>
|
668
|
-
<a class="anchor" name="
|
658
|
+
<a class="anchor" name="80977020ef895f3ea790c5d28a333dda"></a><!-- doxytag: member="Passenger::MessageChannel::writeScalar" ref="80977020ef895f3ea790c5d28a333dda" args="(const char *data, unsigned int size)" -->
|
669
659
|
<div class="memitem">
|
670
660
|
<div class="memproto">
|
671
661
|
<table class="memname">
|
672
662
|
<tr>
|
673
|
-
<td class="memname">void Passenger::MessageChannel::
|
663
|
+
<td class="memname">void Passenger::MessageChannel::writeScalar </td>
|
674
664
|
<td>(</td>
|
665
|
+
<td class="paramtype">const char * </td>
|
666
|
+
<td class="paramname"> <em>data</em>, </td>
|
667
|
+
</tr>
|
668
|
+
<tr>
|
669
|
+
<td class="paramkey"></td>
|
670
|
+
<td></td>
|
675
671
|
<td class="paramtype">unsigned int </td>
|
676
|
-
<td class="paramname"> <em>
|
677
|
-
|
678
|
-
|
672
|
+
<td class="paramname"> <em>size</em></td><td> </td>
|
673
|
+
</tr>
|
674
|
+
<tr>
|
675
|
+
<td></td>
|
676
|
+
<td>)</td>
|
677
|
+
<td></td><td></td><td><code> [inline]</code></td>
|
679
678
|
</tr>
|
680
679
|
</table>
|
681
680
|
</div>
|
682
681
|
<div class="memdoc">
|
683
682
|
|
684
683
|
<p>
|
685
|
-
|
684
|
+
Send a scalar message over the underlying file descriptor.
|
686
685
|
<p>
|
687
|
-
If no data can be read within the timeout period, then a <a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a> will be thrown by one of the read methods, with error code EAGAIN or EWOULDBLOCK.<p>
|
688
686
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
689
687
|
<table border="0" cellspacing="2" cellpadding="0">
|
690
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
688
|
+
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>The scalar message's content. </td></tr>
|
689
|
+
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The number of bytes in <code>data</code>. </td></tr>
|
691
690
|
</table>
|
692
691
|
</dl>
|
692
|
+
<dl class="pre" compact><dt><b>Precondition:</b></dt><dd><code>data != NULL</code> </dd></dl>
|
693
693
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
694
694
|
<table border="0" cellspacing="2" cellpadding="0">
|
695
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
695
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
696
|
+
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
696
697
|
</table>
|
697
698
|
</dl>
|
699
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#4ce6a0e751b5e3563bee583c231569bc" title="Read a scalar message from the underlying file descriptor.">readScalar()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#44e01a783c48abadeea0d915b9893bfb" title="Send a scalar message over the underlying file descriptor.">writeScalar(const string &)</a> </dd></dl>
|
698
700
|
|
699
701
|
</div>
|
700
702
|
</div><p>
|
701
|
-
<a class="anchor" name="
|
703
|
+
<a class="anchor" name="44e01a783c48abadeea0d915b9893bfb"></a><!-- doxytag: member="Passenger::MessageChannel::writeScalar" ref="44e01a783c48abadeea0d915b9893bfb" args="(const string &str)" -->
|
702
704
|
<div class="memitem">
|
703
705
|
<div class="memproto">
|
704
706
|
<table class="memname">
|
705
707
|
<tr>
|
706
|
-
<td class="memname">void Passenger::MessageChannel::
|
708
|
+
<td class="memname">void Passenger::MessageChannel::writeScalar </td>
|
707
709
|
<td>(</td>
|
708
|
-
<td class="paramtype">
|
709
|
-
<td class="paramname"> <em>
|
710
|
+
<td class="paramtype">const string & </td>
|
711
|
+
<td class="paramname"> <em>str</em> </td>
|
710
712
|
<td> ) </td>
|
711
|
-
<td
|
713
|
+
<td><code> [inline]</code></td>
|
712
714
|
</tr>
|
713
715
|
</table>
|
714
716
|
</div>
|
715
717
|
<div class="memdoc">
|
716
718
|
|
717
719
|
<p>
|
718
|
-
|
720
|
+
Send a scalar message over the underlying file descriptor.
|
719
721
|
<p>
|
720
|
-
If no data can be written within the timeout period, then a <a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a> will be thrown, with error code EAGAIN or EWOULDBLOCK.<p>
|
721
722
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
722
723
|
<table border="0" cellspacing="2" cellpadding="0">
|
723
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
724
|
+
<tr><td valign="top"></td><td valign="top"><em>str</em> </td><td>The scalar message's content. </td></tr>
|
724
725
|
</table>
|
725
726
|
</dl>
|
726
727
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
727
728
|
<table border="0" cellspacing="2" cellpadding="0">
|
728
|
-
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>
|
729
|
+
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classPassenger_1_1SystemException.html" title="Represents an error returned by a system call or a standard library call.">SystemException</a></em> </td><td>An error occured while writing the data to the file descriptor. </td></tr>
|
730
|
+
<tr><td valign="top"></td><td valign="top"><em>boost::thread_interrupted</em> </td><td></td></tr>
|
729
731
|
</table>
|
730
732
|
</dl>
|
733
|
+
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPassenger_1_1MessageChannel.html#4ce6a0e751b5e3563bee583c231569bc" title="Read a scalar message from the underlying file descriptor.">readScalar()</a>, <a class="el" href="classPassenger_1_1MessageChannel.html#80977020ef895f3ea790c5d28a333dda" title="Send a scalar message over the underlying file descriptor.">writeScalar(const char *, unsigned int)</a> </dd></dl>
|
731
734
|
|
732
735
|
</div>
|
733
736
|
</div><p>
|
734
737
|
<hr>The documentation for this class was generated from the following file:<ul>
|
735
738
|
<li><a class="el" href="MessageChannel_8h-source.html">MessageChannel.h</a></ul>
|
736
739
|
</div>
|
737
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
740
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Apr 8 22:35:12 2009 for Passenger by
|
738
741
|
<a href="http://www.doxygen.org/index.html">
|
739
|
-
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.
|
742
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
740
743
|
</body>
|
741
744
|
</html>
|