onData This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to Network.UDP.Socket Class Summary

Availability
Windows, Mac OSX, Linux

Usage
mdm.Network.UDP.Socket.onData:Function

Parameters
data:String - The recieved data

Returns
None

Description
Dispatched when data has been received.

Notes
None

Example Code
if(running == false){
running = true;
mdm.Network.UDP.Socket.startServer(SOCKET_PORT);
// add listener
mdm.Network.UDP.Socket.onData = function(event:Object):void{
var eventType:String = event.type;
var eventData:String = event.data.data;
debug("type: "+eventType);
debug("data: "+eventData);
}
}
var epoch:Number = (new Date()).time;
mdm.Network.UDP.Socket.send(REMOTE_HOST, SOCKET_PORT, "Hello World! @ "+epoch);

mdm.Network.UDP.Socket Class Example Downloads
No Example Downloads Available


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page