Announcement

Collapse
No announcement yet.

By opening TCP => program frozen?!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • By opening TCP => program frozen?!

    Hello!

    I have problem with opening tcp port: program - frozen!
    PC with network or online - no problem.
    Without connecting to network (without cable) - frozen... ERR not works!? But without netware - in Win95 ERR work!
    How can TCP-state examine???
    >>> Win95, netware - e.g. Novel; or Win98 <<<

    Thanks
    Alexander

  • #2
    You are missing the following:

    You need to ask if it is a direct connection or not.
    If not direct, check for active connections.
    If not direct and none active, make connection (DUN for example)
    Do TCP
    If not direct and you made the connection close it

    A great example can be found at http://www.basicguru.com/dickinson/ddsmtp.htm

    I opened the connection using this code so I did not have to handle the user name or password.
    iRet = SHELL("rundll32.exe rnaui.dll,RnaDial " & {connection Name})

    Dennis

    ------------------

    Comment


    • #3
      Dennis --

      Thanks, but I can't in "basicguru" about examine of TCP-state find...
      Look "smtp.bas" in samples for PBDLL6.0 - this prog-a froze without connecting to network?!!

      Alexander


      ------------------

      Comment


      • #4
        Pls, explain --
        Without connecting to network (without cable) - frozen...
        You mean, that you have permanent connection through network cable and physically take the cable out of PC without rebooting ?
        If so, we already discussed this problem - it has no any relation to PB at all (see Internet forum, about one month ago)


        ------------------

        Comment


        • #5
          Semen --

          ...Yes, I seen Internet forum, - without good result.
          I take the cable out AND PC REBOOT!!! - without success (
          I have other PC with Win98(only DUN, without netware) and
          by offline - frozen...
          How can TCP-state real examine before OPEN (online-mode
          testing)?

          Thanks
          Alexander


          ------------------

          Comment


          • #6
            alexander --
            i mean http://www.powerbasic.com/support/pb...ad.php?t=28756
            such experiment with cable is simply incorrect, because there are network drivers, which are not able to understand this action.
            if reboot doesn't help, try also to delete all network definition (using control panel). finally, you will receive err = 57, as it should be.
            ------------------


            [this message has been edited by semen matusovski (edited march 23, 2000).]

            Comment


            • #7
              Semen --

              I can't all network definition delete, because I need it!..
              With connecting to network - all works! prog-a frozen only,
              if netware (without cable) not boot. ERR don't receive.

              Alexander


              ------------------


              [This message has been edited by Alexander Doc (edited March 24, 2000).]

              Comment


              • #8
                Alexander --
                I have Dial-Up connection.
                If I'm not connected to Internet, or if to switch off modem I receive Err imm. (tested in Win98, NT4/2000).
                I assume, that you have enough long TimeOut for network drivers.
                Sure, that sooner or later an error will occurs.
                One suggesstion: you can start TCP statements inside the thread. After TCP OPEN you can set global variable ("opened").
                In main program you call this thread and make Sleep in cycle.
                If, for example, after 5 sec your global variable will not be "opened", you inform users "You are not connected to Internet ... Pls, test your cable".


                ------------------

                Comment

                Working...
                X