1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
|
<?xml version="1.0" encoding="UTF-8" ?>
<class xmlns="http://xml.phpdox.net/src" full="Swoole\Server" namespace="Swoole" name="Server">
<method name="addlistener" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Add a new listener to the server."/>
<return type="void"/>
</docblock>
<parameter name="host" optional="false" byreference="false" type="string"/>
<parameter name="port" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="socket_type" optional="false" byreference="false" type="string"/>
</method>
<method name="addProcess" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Add a user defined swoole_process to the server."/>
<return type="boolean"/>
</docblock>
<parameter name="process" optional="false" byreference="false" type="object" class="swoole_process"/>
</method>
<method name="after" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Trigger a callback function after a period of time."/>
<return type="ReturnType"/>
</docblock>
<parameter name="after_time_ms" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="callback" optional="false" byreference="false" type="object" class="callable"/>
<parameter name="param" optional="true" byreference="false" type="string"/>
</method>
<method name="bind" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Bind the connection to a user defined user ID."/>
<return type="boolean"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="uid" optional="false" byreference="false" type="object" class="integer"/>
</method>
<method name="clearTimer" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Stop and destory a timer.">Object oriented style (method):</description>
<return type="void"/>
</docblock>
<parameter name="timer_id" optional="false" byreference="false" type="object" class="integer"/>
</method>
<method name="" abstract="false" static="false" final="false">
<docblock>
<description compact="Stop and destory a timer.">Object oriented style (method):</description>
<return type="void"/>
</docblock>
<parameter name="timer_id" optional="false" byreference="false" type="object" class="integer"/>
</method>
<method name="close" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Close a connection to the client."/>
<return type="boolean"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="reset" optional="true" byreference="false" type="object" class="boolean"/>
</method>
<method name="confirm" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Check status of the connection."/>
<return type="boolean"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
</method>
<method name="connection_info" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Get the connection info by file description."/>
<return type="array"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="reactor_id" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="connection_list" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Get all of the established connections."/>
<return type="array"/>
</docblock>
<parameter name="start_fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="pagesize" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="defer" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Delay execution of the callback function at the end of current EventLoop."/>
<return type="void"/>
</docblock>
<parameter name="callback" optional="false" byreference="false" type="object" class="callable"/>
</method>
<method name="exist" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Check if the connection is existed."/>
<return type="boolean"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
</method>
<method name="finish" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Used in task process for sending result to the worker process when the task is finished."/>
<return type="void"/>
</docblock>
<parameter name="data" optional="false" byreference="false" type="string"/>
</method>
<method name="getClientInfo" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Get the connection info by file description."/>
<return type="ReturnType"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="reactor_id" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="getClientList" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Get all of the established connections."/>
<return type="array"/>
</docblock>
<parameter name="start_fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="pagesize" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="getLastError" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Get the error code of the most recent error."/>
<return type="integer"/>
</docblock>
</method>
<method name="heartbeat" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Check all the connections on the server."/>
<return type="mixed"/>
</docblock>
<parameter name="if_close_connection" optional="false" byreference="false" type="object" class="boolean"/>
</method>
<method name="listen" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Listen on the given IP and port, socket type."/>
<return type="boolean"/>
</docblock>
<parameter name="host" optional="false" byreference="false" type="string"/>
<parameter name="port" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="socket_type" optional="false" byreference="false" type="string"/>
</method>
<method name="on" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Register a callback function by event name."/>
<return type="void"/>
</docblock>
<parameter name="event_name" optional="false" byreference="false" type="string"/>
<parameter name="callback" optional="false" byreference="false" type="object" class="callable"/>
</method>
<method name="pause" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Stop receiving data from the connection."/>
<return type="void"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
</method>
<method name="protect" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Set the connection to be protected mode."/>
<return type="void"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="is_protected" optional="true" byreference="false" type="object" class="boolean"/>
</method>
<method name="reload" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Restart all the worker process."/>
<return type="boolean"/>
</docblock>
</method>
<method name="resume" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Start receving data from the connection."/>
<return type="void"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
</method>
<method name="send" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Send data to the client."/>
<return type="boolean"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="data" optional="false" byreference="false" type="string"/>
<parameter name="reactor_id" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="sendfile" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Send file to the connection."/>
<return type="boolean"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="filename" optional="false" byreference="false" type="string"/>
<parameter name="offset" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="sendMessage" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Send message to worker processes by ID."/>
<return type="boolean"/>
</docblock>
<parameter name="worker_id" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="data" optional="false" byreference="false" type="string"/>
</method>
<method name="sendto" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Send data to the remote UDP address."/>
<return type="boolean"/>
</docblock>
<parameter name="ip" optional="false" byreference="false" type="string"/>
<parameter name="port" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="data" optional="false" byreference="false" type="string"/>
<parameter name="server_socket" optional="true" byreference="false" type="string"/>
</method>
<method name="sendwait" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Send data to the remote socket in the blocking way."/>
<return type="boolean"/>
</docblock>
<parameter name="fd" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="data" optional="false" byreference="false" type="string"/>
</method>
<method name="set" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Set the runtime settings of the swoole server."/>
<return type="ReturnType"/>
</docblock>
<parameter name="settings" optional="false" byreference="false" type="object" class="array"/>
</method>
<method name="shutdown" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Shutdown the master server process, this function can be called in worker processes."/>
<return type="void"/>
</docblock>
</method>
<method name="start" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Start the Swoole server."/>
<return type="void"/>
</docblock>
</method>
<method name="stats" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Get the stats of the Swoole server."/>
<return type="array"/>
</docblock>
</method>
<method name="stop" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Stop the Swoole server."/>
<return type="boolean"/>
</docblock>
<parameter name="worker_id" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="task" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Send data to the task worker processes."/>
<return type="mixed"/>
</docblock>
<parameter name="data" optional="false" byreference="false" type="string"/>
<parameter name="dst_worker_id" optional="true" byreference="false" type="object" class="integer"/>
<parameter name="callback" optional="true" byreference="false" type="object" class="callable"/>
</method>
<method name="taskwait" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Send data to the task worker processes in blocking way."/>
<return type="void"/>
</docblock>
<parameter name="data" optional="false" byreference="false" type="string"/>
<parameter name="timeout" optional="true" byreference="false" type="object" class="float"/>
<parameter name="worker_id" optional="true" byreference="false" type="object" class="integer"/>
</method>
<method name="taskWaitMulti" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Execute multiple tasks concurrently."/>
<return type="void"/>
</docblock>
<parameter name="tasks" optional="false" byreference="false" type="object" class="array"/>
<parameter name="timeout_ms" optional="true" byreference="false" type="object" class="double"/>
</method>
<method name="tick" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Repeats a given function at every given time-interval."/>
<return type="void"/>
</docblock>
<parameter name="interval_ms" optional="false" byreference="false" type="object" class="integer"/>
<parameter name="callback" optional="false" byreference="false" type="object" class="callable"/>
</method>
</class>
|