| Methods |
public
|
createProcess(string $exepath, array $param = [], string $childid = "mid1")
Create Child Process
Parameters
| $exepath |
file path to execute as child process
|
| $param |
pass command line arguments to child process
|
| $childid |
Optional Give the name of child process work as id
|
|
#
|
public
|
sendMsg(type $msg, string $type = 'i')
Send Message to browser
Parameters
| $type |
'i' mean info other mean error
|
Overrides
|
#
|
public
|
setupProxy(string $param)
Advance function
Setup proxy server for website
Advance function
Setup proxy server for website
Deprecated
|
#
|
public
|
setGlobalGate()
Configure Gate as Global Gate Type.
Global Gate has only 1 process for all requests and sessions.
It will start on…
Configure Gate as Global Gate Type.
Global Gate has only 1 process for all requests and sessions.
It will start on first request but it will not exit
with browser close. By default Gate type is multi process
that mean each session or Web Socket has 1 separate process.
|
#
|
public
|
setGlobalGateManager()
Set Manager WS Connection for Global Gate. Every
Global Gate has one main WS connection which started global Gate.
But…
Set Manager WS Connection for Global Gate. Every
Global Gate has one main WS connection which started global Gate.
But this WS connection lost if browser close or reload. So if you need a
manager to control or watch global Gate processing then this method reassign
any connection id as a main connection. Only Work with Global Gate and
Web Socket connection.
|
#
|
public
|
sendAllProcess(string $rawdata = null, string $datatype = "text", string $gate = "")
Send Data to main connections related to All processes of
current Gate or match with $gate.
In case of global Gate…
Send Data to main connections related to All processes of
current Gate or match with $gate.
In case of global Gate(Single Process Gate) Only one main
connection and if it is disconnected then data will not send.
If you want to send data to all connections of global Gate then use sendOthers
or sendAll.
Parameters
| $rawdata |
Optional Default=(send JSServer), JSON String
|
| $datatype |
Optional Default=text Data Type
|
| $gate |
Optional Default=this Gate, Gate of Gate to send data
|
|
#
|
public
|
sendAllWS(string $rawdata = null, string $datatype = "text")
Easy Send Data for custom use sendToWS
Send Data to All WS Connections of Server also included current connection.
Easy Send Data for custom use sendToWS
Send Data to All WS Connections of Server also included current connection.
Parameters
| $rawdata |
Optional Default=(send JSServer), JSON String
|
| $datatype |
Optional Default=text Data Type
|
|
#
|
public
|
sendAll(string $rawdata = null, string $datatype = "text", string $gate = "")
Send Data to All WS Connections related to Gate process, current Gate or
$gate of other Native Gate.
It works similar…
Send Data to All WS Connections related to Gate process, current Gate or
$gate of other Native Gate.
It works similar to sendOthers but also send data to current connection.
Parameters
| $rawdata |
Optional Default=(send JSServer), JSON String
|
| $datatype |
Optional Default=text Data Type
|
| $gate |
Optional Default=this Gate, Gate of Gate to send data
|
|
#
|
public
|
sendOthers(string $rawdata = null, string $datatype = "text", string $gate = "")
Easy Send Data for custom use sendOthersRaw
Send Data to All Others WS Connections and leave current connection id
Easy Send Data for custom use sendOthersRaw
Send Data to All Others WS Connections and leave current connection id
Parameters
| $rawdata |
Optional Default=(send JSServer), JSON String
|
| $datatype |
Optional Default=text Data Type
|
| $gate |
Optional Default=this Gate, Gate of Gate to send data
|
|
#
|
public
|
sendTo(int $conid = 0, string $rawdata = null, string $datatype = "text")
Send Data to connection id or current connection id
Send Data to connection id or current connection id
Parameters
| $conid |
Optional Default=(current request)
|
| $rawdata |
Optional Default=(send JSServer), JSON String
|
| $datatype |
Optional Default=text Data Type
|
|
#
|
public
|
sendOthersRaw(string $rawdata = null, int $sendtype = 0, string $datatype = "text", string $gate = "")
Advance for easy way use SendOthers
Send Data to All Others WS Connections and leave current connection id
Advance for easy way use SendOthers
Send Data to All Others WS Connections and leave current connection id
Parameters
| $rawdata |
Optional Default=(send JSServer), JSON String
|
| $sendtype |
Optional Default=0(All Processes(Only Main Connection
of process not all connections) of $gate Gate or this Gate),
1(All connections of global Gate), 2(All WS connections)
|
| $datatype |
Optional Default=text Data Type
|
| $gate |
Optional Default=this, Gate of Gate to send data
|
|
#
|
public
|
sendToWS(string $rawdata = null, int $sendtype = 0, string $datatype = "text", string $gate = "", int $conid = -1)
Advance
Send Data to WS Connections.
sendtype:-
0 = send data to all processes of this Gate or other Gate Gate as …
Advance
Send Data to WS Connections.
sendtype:-
0 = send data to all processes of this Gate or other Gate Gate as $gate.
for single process Gate(global Gate), data send only to main connection
1 = send data to all connections of WS with global Gate this or other Gate Gate as $gate.
2 = send data to all WS connections of Server
3 = send data to connection id $conid only
Parameters
| $rawdata |
Optional Default=(send JSServer), JSON String
|
| $sendtype |
Optional Default=0 or 1,2,3
|
| $datatype |
Optional Default=text Data Type
|
| $gate |
Optional Gate of Gate to send data
|
| $conid |
Optional Default=-1=all, this id will leave to send data if $sendtype=0,1 or 2
|
|
#
|
public
|
onconsole(string|array $data, string $type)
override this event handler in your Gate to handle it.
Event Handler for Child Process Console output
override this event handler in your Gate to handle it.
Event Handler for Child Process Console output
|
#
|
public
|
page_event_s_onprocesscreate(string $evtp, array $bdata)
SphpServer Event Trigger when Child Process is ready.
SphpServer Event Trigger when Child Process is ready.
Parameters
|
#
|
public
|
onquit()
override this event handler in your Gate to handle it.
Gate Exit Handler
override this event handler in your Gate to handle it.
Gate Exit Handler
|
#
|
public
|
oncquit()
override this event handler in your Gate to handle it.
Gate Child process Exit Handler
override this event handler in your Gate to handle it.
Gate Child process Exit Handler
|
#
|
public
|
onwscon(WsCon $conobj)
override this event handler in your Gate to handle it.
WebSocket Connection Handler,
Trigger on each new connection
override this event handler in your Gate to handle it.
WebSocket Connection Handler,
Trigger on each new connection
Parameters
|
#
|
public
|
onwsdiscon(WsCon $conobj)
override this event handler in your Gate to handle it.
WebSocket DisConnection Handler
Trigger on each connection close
override this event handler in your Gate to handle it.
WebSocket DisConnection Handler
Trigger on each connection close
Parameters
|
#
|
public
|
sendData(array|string $data, string $type = "jsonweb")
Advance Function
Send Data to Browser in JSON format
Advance Function
Send Data to Browser in JSON format
Parameters
| $type |
Optional Default=jsonweb
|
|
#
|
public
|
onwait()
Advance function, Internal use
Override wait event handler of ConsoleGate
Advance function, Internal use
Override wait event handler of ConsoleGate
Overrides
|
#
|
public
|
ExitMe()
Exit Manually
|
#
|