hypermedia.net
index
 
Name setReceiveHandler ( )
Examples None available
Description Register the target's receive handler.

By default, this method name is "receive" with one argument representing the received data as byte[]. For more flexibility, you can change this method with another useful method by passing his name. You could get more informations by implementing two additional arguments, a String representing the sender IP address and a int representing the sender port :

 void myCustomReceiveHandler(byte[] message, String ip, int port) {
	// do something here...
 }
 
Syntax
setReceiveHandler(name);
Parameters
name   the receive handler name
Returns None
Usage Web & Application
Related