RTMFP Connection Tester

Having problems connecting RTMFP? Use this application to test NetConnection, NetStream, NetGroup connection and publishing status. For success connection, opened UDP ports in range 1024..65535 required. Run two instances to test NetGroup neighboring.


Read the rest of this entry »

UNIPacket – Standardize NetGroup, NetStream Raw Messages

UNIPacket and UNIPacketHeader classes is my attempt to standardize communication within NetStream and NetGroup communication. While both Net* classes enables you to send any raw data between two instances of flash, you should carefully handle incomming messages. Imagine you are willing to send additional info with your message (sender, id etc.). That is where UNIPacket classes comes into scene, both are very simple and able to selfcreate from incomming object.

UNIPacket contains only two variables: header:UNIPacketHeader and data:* (holds the actual data being sent).

UNIPacketHeader is dynamic class with prepared variables: id:uint (numeric identificator of message), hash:String (string identificator of message), sender:String (use for sender identification).

Read the rest of this entry »

Quick Tip: Working with NetStream

While working on my brand new P2P project I have come to some issues and solutions, that may help you with your projects. First thing, the NetStatusEvent codes. You may expect that codes are dispatched by the instance of the class they beigins with (e.g. “NetStream.Connect.Success” dispatched by NetStream), but in fact, this does not happen (“NetStream.Connect.Success” is dispatched by NetConnection). I bellieve its not a bug but a feature by flash player developer team. To make this work as expected you may do the following:

netConnection.addEventListener(type, onNetStatus);
        
function onNetConnectionNetStatus(event:NetStatusEvent):void
{
	switch(event.info.code){
		case "NetStream.Connect.Success":
			event.info.stream.dispatchEvent(event);
			break;
		...
	}
}

Read the rest of this entry »

P2P Multicast in Flash Player 10!

P2PMulticast communication flow

P2PMulticast communication flow

P2P multicast in Flash Player 10, yeap… ready? This method creates n:n model of p2p communicators. So broadcasting data goes from broadcaster directly to all receivers. All users are broadcasters and receivers. There is no multilevel logic in it, so keep in mind the upload bandwidth of broadcaster. Feel free to use it in your flash applications, just hit me when you decide.

Core classes and files:

Read the rest of this entry »