Ejemplo n.º 1
0
        public UDTSession(string description, Destination destination)
        {
            statistics       = new UDTStatistics(description);
            mySocketID       = Interlocked.Increment(ref nextSocketID);
            this.destination = destination;
            this.dgPacket    = new UDPUserToken(destination.EndPoint);
            //String clazzP = System.getProperty(CC_CLASS, UDTCongestionControl.class.getName());
            Object ccObject = null;

            ccObject = new UDTCongestionControl(this);
            //try{
            //	Class<?>clazz=Class.forName(clazzP);
            //	ccObject=clazz.getDeclaredConstructor(UDTSession.class).newInstance(this);
            //}catch(Exception e){
            //	logger.log(Level.WARNING,"Can't setup congestion control class <"+clazzP+">, using default.",e);
            //	ccObject=new UDTCongestionControl(this);
            //}
            cc = (ICongestionControl)ccObject;
            //logger.info("Using "+cc.getClass().getName());
        }
Ejemplo n.º 2
0
 public void SendRaw(UDPUserToken p)
 {
     dgSocket.SendTo(p.Buffer, p.Offset, p.Length, SocketFlags.None, p.Remote);
 }