public RtpSocket()
        {
            /*							     Version(2)  Padding(0)					                    */
            /*									 ^		  ^			Extension(0)						*/
            /*									 |		  |				^								*/
            /*									 | --------				|								*/
            /*									 | |---------------------								*/
            /*									 | ||  -----------------------> Source Identifier(0)	*/
            /*									 | ||  |												*/
            buffer[0] = (byte)Java.Lang.Integer.ParseInt("10000000", 2);

            /* Payload Type */
            buffer[1] = (byte)96;

            /* Byte 2,3        ->  Sequence Number                   */
            /* Byte 4,5,6,7    ->  Timestamp                         */

            /* Byte 8,9,10,11  ->  Sync Source Identifier            */
            SetLong((ssrc = (new Random()).NextInt()), 8, 12);

            try {
                usock = new Java.Net.DatagramSocket();
            } catch {
            }
            upack = new Java.Net.DatagramPacket(buffer, 1);
        }
		public RtpSocket() {
			
			/*							     Version(2)  Padding(0)					 					*/
			/*									 ^		  ^			Extension(0)						*/
			/*									 |		  |				^								*/
			/*									 | --------				|								*/
			/*									 | |---------------------								*/
			/*									 | ||  -----------------------> Source Identifier(0)	*/
			/*									 | ||  |												*/
			buffer[0] = (byte) Java.Lang.Integer.ParseInt("10000000",2);
			
			/* Payload Type */
			buffer[1] = (byte) 96;
			
			/* Byte 2,3        ->  Sequence Number                   */
			/* Byte 4,5,6,7    ->  Timestamp                         */
			
			/* Byte 8,9,10,11  ->  Sync Source Identifier            */
			SetLong((ssrc=(new Random()).NextInt()),8,12);
			
			try {
				usock = new Java.Net.DatagramSocket();
			} catch{
				
			}
			upack = new Java.Net.DatagramPacket(buffer, 1);
			
		}
示例#3
0
 public PacketEvent(DatagramPacket packet)
 {
     address = packet.Address;
     port    = packet.Port;
     data    = packet.GetData();
     length  = packet.Length;
     //        Log.Debug("PacketEvent"," p:"+packet.Length+ " d:"+data.Length);
 }