import"SocketManagerPlugin.idl";
This is a class which implements global SocketManager object.
void SocketManager.addEventListener |
( |
[in] String |
event_name, |
|
|
[in] EventListener |
listener |
|
) |
| |
Adds DOM2 event listener for specified event.
Possible values are: event_name: "payloadReceivedEvent", listener: function that has arguments similar to the payloadReceivedEvent interface properties.
- Parameters
-
event_name | Name of the event. |
listener | javascript function that has arguments like the properties listed in the listener's interface. |
Boolean SocketManager.closeUdpSocket |
( |
[in] Integer |
port | ) |
|
This function closes UDP socket for the given port.
- Parameters
-
- Returns
- true if closing UDP socket is successful, false otherwise
Boolean SocketManager.openUdpSocket |
( |
[in] Integer |
port | ) |
|
This function opens UDP socket.
- Parameters
-
- Returns
- true if opening UDP socket is successful, false otherwise
void SocketManager.removeEventListener |
( |
[in] String |
event_name, |
|
|
[in] EventListener |
listener |
|
) |
| |
Removes single DOM2 event listener for specified event
Possible values are: event_name: "payloadReceivedEvent", listener: function that has arguments similar to the payloadReceivedEvent interface properties.
- Parameters
-
event_name | Name of the event |
listener | named javascript function that has arguments like the properties listed in the listener's interface. |
void SocketManager.removeEventListener |
( |
[in] String |
event_name | ) |
|
Boolean SocketManager.sendUdpData |
( |
[in] String |
ip_address, |
|
|
[in] Integer |
port, |
|
|
[in] Integer[] |
payload |
|
) |
| |
This function sends UDP data to a UDP socket. It requires the socket to be opened explicitly by calling openUdpSocket() for the port before calling sendUdpData(). It should be noted that the maximum payload length is 128 kb.
- Parameters
-
ip_address | IP address to which the payload will be sent. |
port | Port to which the payload will be sent. |
payload | Data to be sent. |
- Returns
- true if sending data is successful, false otherwise
The documentation for this interface was generated from the following file: