Menu

java udt can't connect c UDT

Jhone hero
2010-08-20
2013-05-17
1 2 > >> (Page 1 of 2)
  • Jhone hero

    Jhone hero - 2010-08-20

      oh,god!
       It's  not work!          

      I use java UDT iar  (client)  connect   c UDT Service?
       but  failred! 
      please  help…
                                     my mail   zzw2010@gmail.com 

     
  • Bernd Schuller

    Bernd Schuller - 2010-08-20

    … can you be a bit more precise? What exactly did you try and what did not work?

    Bernd.

     
  • Jhone hero

    Jhone hero - 2010-08-20

    client = new UDTClient(InetAddress.getLocalHost());
    InetSocketAddress address = new InetSocketAddress(SERVER_IP,
    SERVER_PORT);
    client.connect(address);
    I  do for that  client!    and  I  recevic  HandShake from c udt  service 
             but   c UDT Service  accept method don't  anything!

     
  • Jhone hero

    Jhone hero - 2010-08-20

    In  java UDT   HandShake    I    add     long  icookies   and    long  Ipv4   two region

                                    so   service  return something         
            but    don't  anything!

     
  • gao fei

    gao fei - 2010-08-20

    client by java just send 1st frame about handshake ,and get response then  do nothing at all .The  server (c++)cannot recive anything.

     
  • Jhone hero

    Jhone hero - 2010-08-20

    2010-8-20 16:52:13 udt.ClientSession sendHandShake
    information: Handshake to Destination: 192.168.6.20 port=9000 socketID=0
    2010-8-20 16:52:13 udt.ClientSession received
    information: Received connection handshake from Destination: 192.168.6.20 port=9000 socketID=1
    2010-8-20 16:52:13 udt.UDTSession setState
    information: udt.ClientSession@1bf73fa connection state CHANGED to <2>
    2010-8-20 16:52:14 udt.ClientSession connect
    information: Connected, 1 handshake packets sent
    2010-8-20 16:52:14 udt.UDTClient connect
    information: The UDTClient is connected
                            
                         I hope  this information  can help you!
                                     please fix this bug!               The  java_udt  will  be  very   useful.
      jhone

     
  • Bernd Schuller

    Bernd Schuller - 2010-08-20

    hi,

    Java and C++ versions of UDT can't talk to each other, because the Java implementation is not fully finished
    Sorry, you need to be patient, since currently I do not have much time for udt-java

    Thanks and regards,
    Bernd.

     
  • Jhone hero

    Jhone hero - 2010-08-23

    Oh, god!
              can  you  tell me   which part  you not  achieve?

                                   I  want   to  try  to  do  it……………

    jhone~

     
  • Bernd Schuller

    Bernd Schuller - 2010-08-23

    … for example finding out why the java and c++ versions do not quite understand each other.

    1) initial sequence number handling is different (e.g. Java starts at zero, C++ at a random number)
    2) the binary packet encoding might be different (but I'm not sure here)

    I'd look at 1) if I had some time

     
  • Jhone hero

    Jhone hero - 2010-08-24

    Thanks…

    jhone~

     
  • Jhone hero

    Jhone hero - 2010-08-27

    Hi
               
                    Four timers are: RC timer, ACK timer, NAK timer, EXP timer. Their periods are: RCTP, ATP, NTP, ETP  
                                
                             Is  it   synchronization  with   C++ UDT timer?
               I find  something  is  not  correct, but  I can't  be  sure.

        ~johoe

     
  • Bernd Schuller

    Bernd Schuller - 2010-08-27

    hi,
    no, the timers do not need to be synchronized.

     
  • Jhone hero

    Jhone hero - 2010-08-27

    but    java  always send  ack( LightAck or  normal),   but   c++ is  not  always.
       
        It   make me puzzle !

    java
    if (!isTriggeredByTimer)
    {
    ackSeqNumber = sendLightAcknowledgment(ackNumber);
    return;
    }
    else
    {
    // pack the packet speed and link capacity into the ACK packet and
    // send it out.
    // (7).records the ACK number,ackseqNumber and the departure time of
    // this Ack in the ACK History Window
    ackSeqNumber = sendAcknowledgment(ackNumber);
    }

    C++
       if ((currtime > m_ullNextACKTime) || ((m_pCC->m_iACKInterval > 0) && (m_pCC->m_iACKInterval <= m_iPktCount)))
       {
          // ACK timer expired or ACK interval reached

          sendCtrl(2);
          CTimer::rdtsc(currtime);
          if (m_pCC->m_iACKPeriod > 0)
             m_ullNextACKTime = currtime + m_pCC->m_iACKPeriod * m_ullCPUFrequency;
          else
             m_ullNextACKTime = currtime + m_ullACKInt;

          m_iPktCount = 0;
          m_iLightACKCount = 1;
       }
       else if (m_iSelfClockInterval * m_iLightACKCount <= m_iPktCount)
       {
          //send a "light" ACK
          sendCtrl(2, NULL, NULL, 4);
          ++ m_iLightACKCount;
       }

    I don't  understand!

     
  • Bernd Schuller

    Bernd Schuller - 2010-08-27

    … UDT is complex :)
    If your problem is that UDT Java and UDT C++ cannot talk to each other, the problem is NOT the ACK.
    You can send as many ack as you want.

    The connection setup in the Java and C++ versions is slightly different, as I wrote before.
    Is it required for your use case to mix Java and C++?

     
  • Jhone hero

    Jhone hero - 2010-08-27

    yes!
       I  need  java Client    vist   c++ service
          
       send   and  receive data!  

     
  • Jhone hero

    Jhone hero - 2010-09-01

    Hi, 
             I am glad to see you  update java_UDT!   
         Thank you!       
                                           can you help me check   class UDTReceiver    receiverAlgorithm()  method,  the  four time is not synchronization      c  UDT   ,can you help me check it!
           Thanks~~~

    ~jhone

     
  • Bernd Schuller

    Bernd Schuller - 2010-09-01

    as I said before, it is not necessary to synchronize timers…

     
  • Jhone hero

    Jhone hero - 2010-09-01

    ok!
      I am  connected  c UDT Service! 
             send data  and  recev data!   but  in  class UDTReceiver receiverAlgorithm() method,    send ack  very frequently,  so  it  not correct work!     can you help me?

      ~jhome

     
  • Bernd Schuller

    Bernd Schuller - 2010-09-01

    sorry, but you can send as many ACK as you want… the UDT protocol will work. If you think there is too many ACK, you can increase the ACK interval (variable ackTimerInterval). The value used is that from the UDT specification. But again, the number of ACKs should not create problems.

     
  • Jhone hero

    Jhone hero - 2010-09-01

      god!
               It;s  so  complex !

     
  • Jhone hero

    Jhone hero - 2010-09-06

    hi~
                 In   UDTClient.java   file    cann't    find  any   method  can   prove   the   udtClient   is  alive,   I want  add a method, but  I don't know where  I shuould   add a method?  
                                  ~jhone

     
  • Bernd Schuller

    Bernd Schuller - 2010-09-06

    you can use udtClient.getSession().isReady()

     
  • Jhone hero

    Jhone hero - 2010-09-06

    Thanks  ~~
       I  means  it  connect service , but  network status  is  very bad,   so  service disconnect  client,    in  this  time ,  client  cann't know disconnected!         

     
  • Bernd Schuller

    Bernd Schuller - 2010-09-06

    there is an expiry interval and keep alive messages in the UDTReceiver, maybe you can add some code there that sets the session state to invalid? Right now I'm a bit busy and can't do much on UDT Java, sorry

     
  • Jhone hero

    Jhone hero - 2010-09-06

    Thanks for your  suggestion!
                    
                            pass the  these day,  I  find  you code is  very  good!   I  learn  much  through  your  java-udt  ,  how long  do you  work in  coder?     I  want  to be the  man  same of you,  but  I  am  very  blindness.  please  give me  some  suggestion about  coder? 
           Thanks~
    ~ jhone

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.