passenger 2.0.1 → 2.0.2
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/Rakefile +2 -1
- data/doc/Security of user switching support.html +1 -1
- data/doc/Users guide.html +1 -1
- data/ext/apache2/ApplicationPoolServerExecutable.cpp +4 -2
- data/ext/apache2/Bucket.cpp +104 -0
- data/ext/apache2/Bucket.h +36 -0
- data/ext/apache2/Configuration.h +1 -1
- data/ext/apache2/Hooks.cpp +2 -5
- data/ext/apache2/Utils.h +1 -1
- data/ext/boost/non_type.hpp +27 -0
- metadata +7 -247
- data/doc/Architectural overview.html +0 -740
- data/doc/cxxapi/ApplicationPoolServer_8h-source.html +0 -677
- data/doc/cxxapi/ApplicationPool_8h-source.html +0 -212
- data/doc/cxxapi/Application_8h-source.html +0 -448
- data/doc/cxxapi/Configuration_8h-source.html +0 -180
- data/doc/cxxapi/DummySpawnManager_8h-source.html +0 -126
- data/doc/cxxapi/Exceptions_8h-source.html +0 -244
- data/doc/cxxapi/Hooks_8h-source.html +0 -63
- data/doc/cxxapi/Logging_8h-source.html +0 -136
- data/doc/cxxapi/MessageChannel_8h-source.html +0 -524
- data/doc/cxxapi/SpawnManager_8h-source.html +0 -593
- data/doc/cxxapi/StandardApplicationPool_8h-source.html +0 -713
- data/doc/cxxapi/System_8h-source.html +0 -251
- data/doc/cxxapi/Utils_8h-source.html +0 -283
- data/doc/cxxapi/annotated.html +0 -59
- data/doc/cxxapi/classClient-members.html +0 -35
- data/doc/cxxapi/classClient.html +0 -117
- data/doc/cxxapi/classDirectoryMapper-members.html +0 -38
- data/doc/cxxapi/classDirectoryMapper.html +0 -203
- data/doc/cxxapi/classHooks-members.html +0 -33
- data/doc/cxxapi/classHooks.html +0 -43
- data/doc/cxxapi/classPassenger_1_1Application-members.html +0 -38
- data/doc/cxxapi/classPassenger_1_1Application.html +0 -229
- data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +0 -40
- data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +0 -331
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +0 -36
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +0 -225
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +0 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +0 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +0 -43
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +0 -329
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +0 -33
- data/doc/cxxapi/classPassenger_1_1BusyException.html +0 -47
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +0 -33
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +0 -44
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +0 -33
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +0 -51
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +0 -33
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +0 -51
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +0 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +0 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +0 -38
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +0 -61
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +0 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +0 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +0 -33
- data/doc/cxxapi/classPassenger_1_1IOException.html +0 -54
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +0 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +0 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +0 -47
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +0 -591
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +0 -35
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +0 -77
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +0 -37
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +0 -255
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +0 -42
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +0 -372
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +0 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +0 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +0 -37
- data/doc/cxxapi/classPassenger_1_1SystemException.html +0 -154
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +0 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +0 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1TempFile-members.html +0 -36
- data/doc/cxxapi/classPassenger_1_1TempFile.html +0 -128
- data/doc/cxxapi/classPassenger_1_1Thread-members.html +0 -35
- data/doc/cxxapi/classPassenger_1_1Thread.html +0 -100
- data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption-members.html +0 -33
- data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption.html +0 -46
- data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption-members.html +0 -33
- data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption.html +0 -44
- data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption-members.html +0 -33
- data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption.html +0 -44
- data/doc/cxxapi/definitions_8h-source.html +0 -28
- data/doc/cxxapi/doxygen.css +0 -433
- data/doc/cxxapi/doxygen.png +0 -0
- data/doc/cxxapi/files.html +0 -41
- data/doc/cxxapi/ftv2blank.png +0 -0
- data/doc/cxxapi/ftv2doc.png +0 -0
- data/doc/cxxapi/ftv2folderclosed.png +0 -0
- data/doc/cxxapi/ftv2folderopen.png +0 -0
- data/doc/cxxapi/ftv2lastnode.png +0 -0
- data/doc/cxxapi/ftv2link.png +0 -0
- data/doc/cxxapi/ftv2mlastnode.png +0 -0
- data/doc/cxxapi/ftv2mnode.png +0 -0
- data/doc/cxxapi/ftv2node.png +0 -0
- data/doc/cxxapi/ftv2plastnode.png +0 -0
- data/doc/cxxapi/ftv2pnode.png +0 -0
- data/doc/cxxapi/ftv2vertline.png +0 -0
- data/doc/cxxapi/functions.html +0 -212
- data/doc/cxxapi/functions_func.html +0 -207
- data/doc/cxxapi/functions_type.html +0 -46
- data/doc/cxxapi/functions_vars.html +0 -48
- data/doc/cxxapi/graph_legend.dot +0 -22
- data/doc/cxxapi/graph_legend.html +0 -87
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Configuration.html +0 -236
- data/doc/cxxapi/group__Configuration.png +0 -0
- data/doc/cxxapi/group__Core.html +0 -51
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +0 -43
- data/doc/cxxapi/group__Hooks.html +0 -46
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +0 -406
- data/doc/cxxapi/hierarchy.html +0 -67
- data/doc/cxxapi/index.html +0 -11
- data/doc/cxxapi/inherit__graph__0.map +0 -1
- data/doc/cxxapi/inherit__graph__0.md5 +0 -1
- data/doc/cxxapi/inherit__graph__0.png +0 -0
- data/doc/cxxapi/inherit__graph__1.map +0 -1
- data/doc/cxxapi/inherit__graph__1.md5 +0 -1
- data/doc/cxxapi/inherit__graph__1.png +0 -0
- data/doc/cxxapi/inherit__graph__10.map +0 -1
- data/doc/cxxapi/inherit__graph__10.md5 +0 -1
- data/doc/cxxapi/inherit__graph__10.png +0 -0
- data/doc/cxxapi/inherit__graph__11.map +0 -1
- data/doc/cxxapi/inherit__graph__11.md5 +0 -1
- data/doc/cxxapi/inherit__graph__11.png +0 -0
- data/doc/cxxapi/inherit__graph__12.map +0 -1
- data/doc/cxxapi/inherit__graph__12.md5 +0 -1
- data/doc/cxxapi/inherit__graph__12.png +0 -0
- data/doc/cxxapi/inherit__graph__13.map +0 -1
- data/doc/cxxapi/inherit__graph__13.md5 +0 -1
- data/doc/cxxapi/inherit__graph__13.png +0 -0
- data/doc/cxxapi/inherit__graph__14.map +0 -2
- data/doc/cxxapi/inherit__graph__14.md5 +0 -1
- data/doc/cxxapi/inherit__graph__14.png +0 -0
- data/doc/cxxapi/inherit__graph__15.map +0 -1
- data/doc/cxxapi/inherit__graph__15.md5 +0 -1
- data/doc/cxxapi/inherit__graph__15.png +0 -0
- data/doc/cxxapi/inherit__graph__16.map +0 -1
- data/doc/cxxapi/inherit__graph__16.md5 +0 -1
- data/doc/cxxapi/inherit__graph__16.png +0 -0
- data/doc/cxxapi/inherit__graph__17.map +0 -1
- data/doc/cxxapi/inherit__graph__17.md5 +0 -1
- data/doc/cxxapi/inherit__graph__17.png +0 -0
- data/doc/cxxapi/inherit__graph__2.map +0 -1
- data/doc/cxxapi/inherit__graph__2.md5 +0 -1
- data/doc/cxxapi/inherit__graph__2.png +0 -0
- data/doc/cxxapi/inherit__graph__3.map +0 -1
- data/doc/cxxapi/inherit__graph__3.md5 +0 -1
- data/doc/cxxapi/inherit__graph__3.png +0 -0
- data/doc/cxxapi/inherit__graph__4.map +0 -1
- data/doc/cxxapi/inherit__graph__4.md5 +0 -1
- data/doc/cxxapi/inherit__graph__4.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +0 -1
- data/doc/cxxapi/inherit__graph__5.md5 +0 -1
- data/doc/cxxapi/inherit__graph__5.png +0 -0
- data/doc/cxxapi/inherit__graph__6.map +0 -1
- data/doc/cxxapi/inherit__graph__6.md5 +0 -1
- data/doc/cxxapi/inherit__graph__6.png +0 -0
- data/doc/cxxapi/inherit__graph__7.map +0 -1
- data/doc/cxxapi/inherit__graph__7.md5 +0 -1
- data/doc/cxxapi/inherit__graph__7.png +0 -0
- data/doc/cxxapi/inherit__graph__8.map +0 -1
- data/doc/cxxapi/inherit__graph__8.md5 +0 -1
- data/doc/cxxapi/inherit__graph__8.png +0 -0
- data/doc/cxxapi/inherit__graph__9.map +0 -2
- data/doc/cxxapi/inherit__graph__9.md5 +0 -1
- data/doc/cxxapi/inherit__graph__9.png +0 -0
- data/doc/cxxapi/inherits.html +0 -102
- data/doc/cxxapi/main.html +0 -27
- data/doc/cxxapi/modules.html +0 -34
- data/doc/cxxapi/namespacePassenger.html +0 -208
- data/doc/cxxapi/namespacePassenger_1_1InterruptableCalls.html +0 -43
- data/doc/cxxapi/namespacemembers.html +0 -70
- data/doc/cxxapi/namespacemembers_func.html +0 -66
- data/doc/cxxapi/namespacemembers_type.html +0 -46
- data/doc/cxxapi/namespaces.html +0 -35
- data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +0 -33
- data/doc/cxxapi/structPassenger_1_1AnythingToString.html +0 -49
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +0 -33
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +0 -49
- data/doc/cxxapi/tab_b.gif +0 -0
- data/doc/cxxapi/tab_l.gif +0 -0
- data/doc/cxxapi/tab_r.gif +0 -0
- data/doc/cxxapi/tabs.css +0 -102
- data/doc/cxxapi/tree.html +0 -166
- data/doc/rdoc/classes/ConditionVariable.html +0 -160
- data/doc/rdoc/classes/Exception.html +0 -120
- data/doc/rdoc/classes/GC.html +0 -113
- data/doc/rdoc/classes/IO.html +0 -150
- data/doc/rdoc/classes/Passenger.html +0 -136
- data/doc/rdoc/classes/Passenger/AbstractRequestHandler.html +0 -401
- data/doc/rdoc/classes/Passenger/AbstractServer.html +0 -649
- data/doc/rdoc/classes/Passenger/AbstractServer/ServerAlreadyStarted.html +0 -97
- data/doc/rdoc/classes/Passenger/AbstractServer/ServerError.html +0 -96
- data/doc/rdoc/classes/Passenger/AbstractServer/ServerNotStarted.html +0 -97
- data/doc/rdoc/classes/Passenger/AbstractServer/UnknownMessage.html +0 -96
- data/doc/rdoc/classes/Passenger/AppInitError.html +0 -137
- data/doc/rdoc/classes/Passenger/Application.html +0 -296
- data/doc/rdoc/classes/Passenger/ConsoleTextTemplate.html +0 -172
- data/doc/rdoc/classes/Passenger/FrameworkInitError.html +0 -143
- data/doc/rdoc/classes/Passenger/HTMLTemplate.html +0 -175
- data/doc/rdoc/classes/Passenger/InitializationError.html +0 -141
- data/doc/rdoc/classes/Passenger/MessageChannel.html +0 -488
- data/doc/rdoc/classes/Passenger/NativeSupport.html +0 -320
- data/doc/rdoc/classes/Passenger/SpawnManager.html +0 -375
- data/doc/rdoc/classes/Passenger/UnknownError.html +0 -125
- data/doc/rdoc/classes/Passenger/Utils.html +0 -580
- data/doc/rdoc/classes/Passenger/VersionNotFound.html +0 -140
- data/doc/rdoc/classes/PlatformInfo.html +0 -292
- data/doc/rdoc/classes/RakeExtensions.html +0 -197
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -230
- data/doc/rdoc/files/README.html +0 -150
- data/doc/rdoc/files/ext/passenger/native_support_c.html +0 -92
- data/doc/rdoc/files/lib/passenger/abstract_request_handler_rb.html +0 -125
- data/doc/rdoc/files/lib/passenger/abstract_server_rb.html +0 -127
- data/doc/rdoc/files/lib/passenger/application_rb.html +0 -123
- data/doc/rdoc/files/lib/passenger/console_text_template_rb.html +0 -122
- data/doc/rdoc/files/lib/passenger/constants_rb.html +0 -114
- data/doc/rdoc/files/lib/passenger/dependencies_rb.html +0 -130
- data/doc/rdoc/files/lib/passenger/exceptions_rb.html +0 -118
- data/doc/rdoc/files/lib/passenger/html_template_rb.html +0 -122
- data/doc/rdoc/files/lib/passenger/message_channel_rb.html +0 -118
- data/doc/rdoc/files/lib/passenger/platform_info_rb.html +0 -122
- data/doc/rdoc/files/lib/passenger/simple_benchmarking_rb.html +0 -118
- data/doc/rdoc/files/lib/passenger/spawn_manager_rb.html +0 -139
- data/doc/rdoc/files/lib/passenger/utils_rb.html +0 -130
- data/doc/rdoc/files/lib/rake/extensions_rb.html +0 -122
- data/doc/rdoc/fr_class_index.html +0 -71
- data/doc/rdoc/fr_file_index.html +0 -63
- data/doc/rdoc/fr_method_index.html +0 -120
- data/doc/rdoc/index.html +0 -26
- data/doc/rdoc/rdoc-style.css +0 -187
@@ -1,488 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Class: Passenger::MessageChannel</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Class</span><br />Passenger::MessageChannel</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing="0" cellpadding="2">
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../../files/lib/passenger/message_channel_rb.html">lib/passenger/message_channel.rb</a>
|
61
|
-
</td>
|
62
|
-
</tr>
|
63
|
-
<tr>
|
64
|
-
<td>Parent:</td>
|
65
|
-
<td>
|
66
|
-
Object
|
67
|
-
</td>
|
68
|
-
</tr>
|
69
|
-
</table>
|
70
|
-
</td>
|
71
|
-
</tr>
|
72
|
-
</table>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
<div id="content">
|
77
|
-
|
78
|
-
<div class="description"><p>
|
79
|
-
This class provides convenience methods for:
|
80
|
-
</p>
|
81
|
-
<ul>
|
82
|
-
<li>sending and receiving raw data over an <a href="../IO.html">IO</a> channel.
|
83
|
-
|
84
|
-
</li>
|
85
|
-
<li>sending and receiving messages over an <a href="../IO.html">IO</a> channel.
|
86
|
-
|
87
|
-
</li>
|
88
|
-
<li>file descriptor (<a href="../IO.html">IO</a> object) passing over a Unix
|
89
|
-
socket.
|
90
|
-
|
91
|
-
</li>
|
92
|
-
</ul>
|
93
|
-
<p>
|
94
|
-
All of these methods use exceptions for error reporting.
|
95
|
-
</p>
|
96
|
-
<p>
|
97
|
-
There are two kinds of messages:
|
98
|
-
</p>
|
99
|
-
<dl>
|
100
|
-
<dt> Array messages </dt><dd>These are just a list of strings, and the message itself has a specific
|
101
|
-
length. The contained strings may not contain NUL characters
|
102
|
-
(<tt>’\0‘</tt>). Note that an array message must have at least
|
103
|
-
one element.
|
104
|
-
|
105
|
-
</dd>
|
106
|
-
<dt> Scalar messages </dt><dd>These are byte strings which may contain arbitrary binary data. Scalar
|
107
|
-
messages also have a specific length.
|
108
|
-
|
109
|
-
</dd>
|
110
|
-
</dl>
|
111
|
-
<p>
|
112
|
-
The protocol is designed to be low overhead, easy to implement and easy to
|
113
|
-
parse.
|
114
|
-
</p>
|
115
|
-
<p>
|
116
|
-
<a href="MessageChannel.html">MessageChannel</a> is to be wrapped around an
|
117
|
-
<a href="../IO.html">IO</a> object. For example:
|
118
|
-
</p>
|
119
|
-
<pre>
|
120
|
-
a, b = IO.pipe
|
121
|
-
channel1 = MessageChannel.new(a)
|
122
|
-
channel2 = MessageChannel.new(b)
|
123
|
-
|
124
|
-
# Send an array message.
|
125
|
-
channel2.write("hello", "world !!")
|
126
|
-
channel1.read # => ["hello", "world !!"]
|
127
|
-
|
128
|
-
# Send a scalar message.
|
129
|
-
channel2.write_scalar("some long string which can contain arbitrary binary data")
|
130
|
-
channel1.read_scalar
|
131
|
-
</pre>
|
132
|
-
<p>
|
133
|
-
The life time of a <a href="MessageChannel.html">MessageChannel</a> is
|
134
|
-
independent from that of the wrapped <a href="../IO.html">IO</a> object. If
|
135
|
-
a <a href="MessageChannel.html">MessageChannel</a> object is destroyed, the
|
136
|
-
underlying <a href="../IO.html">IO</a> object is not automatically closed.
|
137
|
-
Call <a href="MessageChannel.html#M000074">close</a>() if you want to <a
|
138
|
-
href="MessageChannel.html#M000074">close</a> the underlying <a
|
139
|
-
href="../IO.html">IO</a> object.
|
140
|
-
</p>
|
141
|
-
<p>
|
142
|
-
Note: Be careful with mixing the sending/receiving of array messages,
|
143
|
-
scalar messages and <a href="../IO.html">IO</a> objects. If you send a
|
144
|
-
collection of any of these in a specific order, then the receiving side
|
145
|
-
must receive them in the exact some order. So suppose you first send a
|
146
|
-
message, then an <a href="../IO.html">IO</a> object, then a scalar, then
|
147
|
-
the receiving side must first receive a message, then an <a
|
148
|
-
href="../IO.html">IO</a> object, then a scalar. If the receiving side does
|
149
|
-
things in the wrong order then bad things will happen.
|
150
|
-
</p>
|
151
|
-
</div>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<div class="sectiontitle">Methods</div>
|
156
|
-
<ul>
|
157
|
-
<li><a href="#M000074">close</a></li>
|
158
|
-
<li><a href="#M000073">fileno</a></li>
|
159
|
-
<li><a href="#M000066">new</a></li>
|
160
|
-
<li><a href="#M000067">read</a></li>
|
161
|
-
<li><a href="#M000068">read_scalar</a></li>
|
162
|
-
<li><a href="#M000071">recv_io</a></li>
|
163
|
-
<li><a href="#M000072">send_io</a></li>
|
164
|
-
<li><a href="#M000069">write</a></li>
|
165
|
-
<li><a href="#M000070">write_scalar</a></li>
|
166
|
-
</ul>
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
<div class="sectiontitle">Attributes</div>
|
173
|
-
<table border='0' cellpadding='5'>
|
174
|
-
<tr valign='top'>
|
175
|
-
<td class='attr-rw'>
|
176
|
-
[R]
|
177
|
-
</td>
|
178
|
-
<td class='attr-name'>io</td>
|
179
|
-
<td class='attr-desc'>
|
180
|
-
The wrapped <a href="../IO.html">IO</a> object.
|
181
|
-
|
182
|
-
</td>
|
183
|
-
</tr>
|
184
|
-
</table>
|
185
|
-
|
186
|
-
<div class="sectiontitle">Public Class methods</div>
|
187
|
-
<div class="method">
|
188
|
-
<div class="title">
|
189
|
-
<a name="M000066"></a><b>new</b>(io)
|
190
|
-
</div>
|
191
|
-
<div class="description">
|
192
|
-
<p>
|
193
|
-
Create a <a href="MessageChannel.html#M000066">new</a> <a
|
194
|
-
href="MessageChannel.html">MessageChannel</a> by wrapping the given <a
|
195
|
-
href="../IO.html">IO</a> object.
|
196
|
-
</p>
|
197
|
-
</div>
|
198
|
-
<div class="sourcecode">
|
199
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p>
|
200
|
-
<div id="M000066_source" class="dyn-source">
|
201
|
-
<pre>
|
202
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 77</span>
|
203
|
-
77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>)
|
204
|
-
78: <span class="ruby-ivar">@io</span> = <span class="ruby-identifier">io</span>
|
205
|
-
79: <span class="ruby-keyword kw">end</span>
|
206
|
-
</pre>
|
207
|
-
</div>
|
208
|
-
</div>
|
209
|
-
</div>
|
210
|
-
<div class="sectiontitle">Public Instance methods</div>
|
211
|
-
<div class="method">
|
212
|
-
<div class="title">
|
213
|
-
<a name="M000074"></a><b>close</b>()
|
214
|
-
</div>
|
215
|
-
<div class="description">
|
216
|
-
<p>
|
217
|
-
Close the underlying <a href="../IO.html">IO</a> stream. Might raise
|
218
|
-
SystemCallError or IOError when something goes wrong.
|
219
|
-
</p>
|
220
|
-
</div>
|
221
|
-
<div class="sourcecode">
|
222
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000074_source')" id="l_M000074_source">show source</a> ]</p>
|
223
|
-
<div id="M000074_source" class="dyn-source">
|
224
|
-
<pre>
|
225
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 210</span>
|
226
|
-
210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
227
|
-
211: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">close</span>
|
228
|
-
212: <span class="ruby-keyword kw">end</span>
|
229
|
-
</pre>
|
230
|
-
</div>
|
231
|
-
</div>
|
232
|
-
</div>
|
233
|
-
<div class="method">
|
234
|
-
<div class="title">
|
235
|
-
<a name="M000073"></a><b>fileno</b>()
|
236
|
-
</div>
|
237
|
-
<div class="description">
|
238
|
-
<p>
|
239
|
-
Return the file descriptor of the underlying <a href="../IO.html">IO</a>
|
240
|
-
object.
|
241
|
-
</p>
|
242
|
-
</div>
|
243
|
-
<div class="sourcecode">
|
244
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show source</a> ]</p>
|
245
|
-
<div id="M000073_source" class="dyn-source">
|
246
|
-
<pre>
|
247
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 204</span>
|
248
|
-
204: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileno</span>
|
249
|
-
205: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">fileno</span>
|
250
|
-
206: <span class="ruby-keyword kw">end</span>
|
251
|
-
</pre>
|
252
|
-
</div>
|
253
|
-
</div>
|
254
|
-
</div>
|
255
|
-
<div class="method">
|
256
|
-
<div class="title">
|
257
|
-
<a name="M000067"></a><b>read</b>()
|
258
|
-
</div>
|
259
|
-
<div class="description">
|
260
|
-
<p>
|
261
|
-
Read an array message from the underlying file descriptor. Returns the
|
262
|
-
array message as an array, or nil when end-of-stream has been reached.
|
263
|
-
</p>
|
264
|
-
<p>
|
265
|
-
Might raise SystemCallError, IOError or SocketError when something goes
|
266
|
-
wrong.
|
267
|
-
</p>
|
268
|
-
</div>
|
269
|
-
<div class="sourcecode">
|
270
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p>
|
271
|
-
<div id="M000067_source" class="dyn-source">
|
272
|
-
<pre>
|
273
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 87</span>
|
274
|
-
87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>
|
275
|
-
88: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
|
276
|
-
89: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator"><</span> <span class="ruby-constant">HEADER_SIZE</span>
|
277
|
-
90: <span class="ruby-identifier">buffer</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">HEADER_SIZE</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
|
278
|
-
91: <span class="ruby-keyword kw">end</span>
|
279
|
-
92:
|
280
|
-
93: <span class="ruby-identifier">chunk_size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'n'</span>)[<span class="ruby-value">0</span>]
|
281
|
-
94: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
|
282
|
-
95: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">chunk_size</span>
|
283
|
-
96: <span class="ruby-identifier">buffer</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">chunk_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
|
284
|
-
97: <span class="ruby-keyword kw">end</span>
|
285
|
-
98:
|
286
|
-
99: <span class="ruby-identifier">message</span> = []
|
287
|
-
100: <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>
|
288
|
-
101: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
|
289
|
-
102: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">delimiter_pos</span>.<span class="ruby-identifier">nil?</span>
|
290
|
-
103: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
291
|
-
104: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">""</span>
|
292
|
-
105: <span class="ruby-keyword kw">else</span>
|
293
|
-
106: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">offset</span> <span class="ruby-operator">..</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
|
294
|
-
107: <span class="ruby-keyword kw">end</span>
|
295
|
-
108: <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
296
|
-
109: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
|
297
|
-
110: <span class="ruby-keyword kw">end</span>
|
298
|
-
111: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">message</span>
|
299
|
-
112: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
|
300
|
-
113: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
301
|
-
114: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
|
302
|
-
115: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
303
|
-
116: <span class="ruby-keyword kw">end</span>
|
304
|
-
</pre>
|
305
|
-
</div>
|
306
|
-
</div>
|
307
|
-
</div>
|
308
|
-
<div class="method">
|
309
|
-
<div class="title">
|
310
|
-
<a name="M000068"></a><b>read_scalar</b>(max_size = nil)
|
311
|
-
</div>
|
312
|
-
<div class="description">
|
313
|
-
<p>
|
314
|
-
Read a scalar message from the underlying <a href="../IO.html">IO</a>
|
315
|
-
object. Returns the <a href="MessageChannel.html#M000067">read</a> message,
|
316
|
-
or nil on end-of-stream.
|
317
|
-
</p>
|
318
|
-
<p>
|
319
|
-
Might raise SystemCallError, IOError or SocketError when something goes
|
320
|
-
wrong.
|
321
|
-
</p>
|
322
|
-
<p>
|
323
|
-
The <tt>max_size</tt> argument allows one to specify the maximum allowed
|
324
|
-
size for the scalar message. If the received scalar message‘s size is
|
325
|
-
larger than <tt>max_size</tt>, then a SecurityError will be raised.
|
326
|
-
</p>
|
327
|
-
</div>
|
328
|
-
<div class="sourcecode">
|
329
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p>
|
330
|
-
<div id="M000068_source" class="dyn-source">
|
331
|
-
<pre>
|
332
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 127</span>
|
333
|
-
127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_scalar</span>(<span class="ruby-identifier">max_size</span> = <span class="ruby-keyword kw">nil</span>)
|
334
|
-
128: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
|
335
|
-
129: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span>
|
336
|
-
130: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator"><</span> <span class="ruby-value">4</span>
|
337
|
-
131: <span class="ruby-identifier">buffer</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">4</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
|
338
|
-
132: <span class="ruby-keyword kw">end</span>
|
339
|
-
133: <span class="ruby-identifier">size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'N'</span>)[<span class="ruby-value">0</span>]
|
340
|
-
134: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
341
|
-
135: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span>
|
342
|
-
136: <span class="ruby-keyword kw">else</span>
|
343
|
-
137: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">max_size</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-identifier">max_size</span>
|
344
|
-
138: <span class="ruby-identifier">raise</span> <span class="ruby-constant">SecurityError</span>, <span class="ruby-node">"Scalar message size (#{size}) "</span> <span class="ruby-operator"><<</span>
|
345
|
-
139: <span class="ruby-node">"exceeds maximum allowed size (#{max_size})."</span>
|
346
|
-
140: <span class="ruby-keyword kw">end</span>
|
347
|
-
141: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
|
348
|
-
142: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">size</span>
|
349
|
-
143: <span class="ruby-identifier">buffer</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
|
350
|
-
144: <span class="ruby-keyword kw">end</span>
|
351
|
-
145: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>
|
352
|
-
146: <span class="ruby-keyword kw">end</span>
|
353
|
-
147: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
|
354
|
-
148: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
355
|
-
149: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
|
356
|
-
150: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
357
|
-
151: <span class="ruby-keyword kw">end</span>
|
358
|
-
</pre>
|
359
|
-
</div>
|
360
|
-
</div>
|
361
|
-
</div>
|
362
|
-
<div class="method">
|
363
|
-
<div class="title">
|
364
|
-
<a name="M000071"></a><b>recv_io</b>()
|
365
|
-
</div>
|
366
|
-
<div class="description">
|
367
|
-
<p>
|
368
|
-
Receive an <a href="../IO.html">IO</a> object (a file descriptor) from the
|
369
|
-
channel. The other side must have sent an <a href="../IO.html">IO</a>
|
370
|
-
object by calling <a href="MessageChannel.html#M000072">send_io</a>(). Note
|
371
|
-
that this only works on Unix sockets.
|
372
|
-
</p>
|
373
|
-
<p>
|
374
|
-
Might raise SystemCallError, IOError or SocketError when something goes
|
375
|
-
wrong.
|
376
|
-
</p>
|
377
|
-
</div>
|
378
|
-
<div class="sourcecode">
|
379
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show source</a> ]</p>
|
380
|
-
<div id="M000071_source" class="dyn-source">
|
381
|
-
<pre>
|
382
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 189</span>
|
383
|
-
189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recv_io</span>
|
384
|
-
190: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">recv_io</span>
|
385
|
-
191: <span class="ruby-keyword kw">end</span>
|
386
|
-
</pre>
|
387
|
-
</div>
|
388
|
-
</div>
|
389
|
-
</div>
|
390
|
-
<div class="method">
|
391
|
-
<div class="title">
|
392
|
-
<a name="M000072"></a><b>send_io</b>(io)
|
393
|
-
</div>
|
394
|
-
<div class="description">
|
395
|
-
<p>
|
396
|
-
Send an <a href="../IO.html">IO</a> object (a file descriptor) over the
|
397
|
-
channel. The other side must receive the <a href="../IO.html">IO</a> object
|
398
|
-
by calling <a href="MessageChannel.html#M000071">recv_io</a>(). Note that
|
399
|
-
this only works on Unix sockets.
|
400
|
-
</p>
|
401
|
-
<p>
|
402
|
-
Might raise SystemCallError, IOError or SocketError when something goes
|
403
|
-
wrong.
|
404
|
-
</p>
|
405
|
-
</div>
|
406
|
-
<div class="sourcecode">
|
407
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000072_source')" id="l_M000072_source">show source</a> ]</p>
|
408
|
-
<div id="M000072_source" class="dyn-source">
|
409
|
-
<pre>
|
410
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 199</span>
|
411
|
-
199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
|
412
|
-
200: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
|
413
|
-
201: <span class="ruby-keyword kw">end</span>
|
414
|
-
</pre>
|
415
|
-
</div>
|
416
|
-
</div>
|
417
|
-
</div>
|
418
|
-
<div class="method">
|
419
|
-
<div class="title">
|
420
|
-
<a name="M000069"></a><b>write</b>(name, *args)
|
421
|
-
</div>
|
422
|
-
<div class="description">
|
423
|
-
<p>
|
424
|
-
Send an array message, which consists of the given elements, over the
|
425
|
-
underlying file descriptor. <em>name</em> is the first element in the
|
426
|
-
message, and <em>args</em> are the other elements. These arguments will
|
427
|
-
internally be converted to strings by calling to_s().
|
428
|
-
</p>
|
429
|
-
<p>
|
430
|
-
Might raise SystemCallError, IOError or SocketError when something goes
|
431
|
-
wrong.
|
432
|
-
</p>
|
433
|
-
</div>
|
434
|
-
<div class="sourcecode">
|
435
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p>
|
436
|
-
<div id="M000069_source" class="dyn-source">
|
437
|
-
<pre>
|
438
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 160</span>
|
439
|
-
160: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
440
|
-
161: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">name</span>)
|
441
|
-
162: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
|
442
|
-
163: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">arg</span>)
|
443
|
-
164: <span class="ruby-keyword kw">end</span>
|
444
|
-
165:
|
445
|
-
166: <span class="ruby-identifier">message</span> = <span class="ruby-node">"#{name}#{DELIMITER}"</span>
|
446
|
-
167: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
|
447
|
-
168: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">DELIMITER</span>
|
448
|
-
169: <span class="ruby-keyword kw">end</span>
|
449
|
-
170: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'n'</span>) <span class="ruby-operator"><<</span> <span class="ruby-identifier">message</span>)
|
450
|
-
171: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
|
451
|
-
172: <span class="ruby-keyword kw">end</span>
|
452
|
-
</pre>
|
453
|
-
</div>
|
454
|
-
</div>
|
455
|
-
</div>
|
456
|
-
<div class="method">
|
457
|
-
<div class="title">
|
458
|
-
<a name="M000070"></a><b>write_scalar</b>(data)
|
459
|
-
</div>
|
460
|
-
<div class="description">
|
461
|
-
<p>
|
462
|
-
Send a scalar message over the underlying <a href="../IO.html">IO</a>
|
463
|
-
object.
|
464
|
-
</p>
|
465
|
-
<p>
|
466
|
-
Might raise SystemCallError, IOError or SocketError when something goes
|
467
|
-
wrong.
|
468
|
-
</p>
|
469
|
-
</div>
|
470
|
-
<div class="sourcecode">
|
471
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p>
|
472
|
-
<div id="M000070_source" class="dyn-source">
|
473
|
-
<pre>
|
474
|
-
<span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 178</span>
|
475
|
-
178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_scalar</span>(<span class="ruby-identifier">data</span>)
|
476
|
-
179: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">data</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'N'</span>) <span class="ruby-operator"><<</span> <span class="ruby-identifier">data</span>)
|
477
|
-
180: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
|
478
|
-
181: <span class="ruby-keyword kw">end</span>
|
479
|
-
</pre>
|
480
|
-
</div>
|
481
|
-
</div>
|
482
|
-
</div>
|
483
|
-
</div>
|
484
|
-
|
485
|
-
</div>
|
486
|
-
|
487
|
-
</body>
|
488
|
-
</html>
|