Base | --Server
Located in File: Program_Root/sdk/server/Server.php
Provides a simple socket server for receiving SMS and Notification requests from the gateway.
Magnus Rosenquist, Zyneo
Class Variable Summary |
$__listener
Listener object for callbacks Default Value:
|
$__socket
The listening socket Default Value:
|
Inherited Class Variable Summary | |||||||||||||||||||||
Inherited From Class Base
|
Method Summary |
void constructor Server ( )
Creates a new Server |
void addEventListener ( $listener )
Adds the listener which is called when requests are received. |
void onMessageReceive ( $message )
This function is called when the ServerSocket receives an incoming message. The message is parsed and depending on request-type different call-back methods are called, either 'onSMSReceive' or 'onNotificationReceive'. |
void run ( )
Starts the server, which connects to the gateway and listens for requests. |
void sendResponse ( $response )
Sends a Response object back to the gateway. |
Inherited Method Summary |
Inherited From Class Base
|
Method Detail |
void Server( string $host, int $port)
Creates a new Server- string $host:
- int $port:
[ Top ]
void addEventListener( object $listener)
Adds the listener which is called when requests are received.This is only used by the GatewayListener.
- object $listener: the object listening for requests.
sdk.GatewaySender
[ Top ]
void onMessageReceive( string $message)
This function is called when the ServerSocket receives an incoming message. The message is parsed and depending on request-type different call-back methods are called, either 'onSMSReceive' or 'onNotificationReceive'.- string $message: incoming from socket.
[ Top ]
void run( )
Starts the server, which connects to the gateway and listens for requests.[ Top ]
void sendResponse( Response $response)
Sends a Response object back to the gateway.- Response $response: the response object
[ Top ]
Variable Detail |
[ Top ]
[ Top ]