Announcement

Collapse
No announcement yet.

EchoServ / EClient Question

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

  • EchoServ / EClient Question

    Hi;

    When I start the EClient side of this sample, it returns: Error opening port: 57
    The EchoServ side returns: HH:MM:SS - Connected to Port 999

    Question: What am I doing wrong?

  • #2
    Need to see some code that exhibites the problem.
    Dale

    Comment


    • #3
      I was using was the EchoServ and EClient samples in Samples/Internet folder.
      I tried the pre-compiled samples and I tried compiling the supplied source code. No changes were made to the sample source code.

      Comment


      • #4
        Run the server 1st
        Then run the client

        Other way around you will get Error 57



        And yes I did check if starting 2 servers would create the error, and no they did not
        Engineer's Motto: If it aint broke take it apart and fix it

        "If at 1st you don't succeed... call it version 1.0"

        "Half of Programming is coding"....."The other 90% is DEBUGGING"

        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

        Comment


        • #5
          Thanks for the tip Cliff.

          Unfortunately, it didn't work.

          Comment


          • #6
            In EClient.bas, in line:

            $SERVER = ""

            You have to put the name or IP number of the PC where EchoSrv is running between the quotes.

            If running both on one PC then put 127.0.0.1 the standard loopback IP.

            Cheers,
            Dale

            Comment


            • #7
              i guess powerbasic will not object to having the exe's to the windows version of the echo server and client here so people can test to verify these programs can work on their machines when having problems with their own code in case there where errors placed in the code by accident.
              i have programs in place that will block these programs from running properly and these examples could be used to see if there is something blocking on others computers. it is very frustrating to have something blocking a program for performing some duty and then you keep spending much time in the source code looking for a problem that does not exist.

              the tcp programs are echserv and eclient and a whois in gui format using pbwin.
              Attached Files
              Last edited by Paul Purvis; 31 May 2008, 03:52 PM.
              p purvis

              Comment


              • #8
                Gentlemen;

                Many thanks for your responses. Unfortunately, I still can't get it to work.

                This may have somsthing to do with the fact my PC is connected to a network. I'll try these samples on my personal PC which is not connected to a network.

                Comment


                • #9
                  If using a router, check router software that port 999 is being sent to your local machine 192.168.0.2, etc...
                  If using ZoneAlarm, check if port 999 is being blocked.
                  Last resort if the registry is corrupted:
                  http://www.snapfiles.com/get/winsockxpfix.html
                  Last edited by Mike Doty; 31 May 2008, 04:20 PM.

                  Comment


                  • #10
                    here is the eclient program slightly changed to allow the suppling of the ip address or the url where the echo server is located on the command line.

                    you can probably also use the computer name the echo server is running on.

                    if your ip address is 192.168.0.25 then "eclnt2ip 192.168.0.25"
                    if your computer is named workstation1 then "eclnt2ip workstation1"

                    basically anywhere the echo server is provided you are not blocked in some way.

                    added:
                    small change to program
                    if nothing is placed on the command line, the computer checked for the echo server will be the same computer itself.
                    Attached Files
                    Last edited by Paul Purvis; 31 May 2008, 05:20 PM.
                    p purvis

                    Comment


                    • #11
                      "I'll try these samples on my personal PC which is not connected to a network."

                      That won't work unless the PC has a NIC, and IP stack installed and setup.

                      I agree with Mike, anti-virus filtering is the likely problem.
                      Dale

                      Comment


                      • #12
                        Either machine Windows 98?
                        http://www.powerbasic.com/support/pb...ad.php?t=29006

                        Comment


                        • #13
                          Mike;
                          No! both are running XP. I think your suggestion about Anti Virus S/W is the most likely explanation.

                          Once again thank to all of you for the help.

                          Comment


                          • #14
                            Walter
                            Whilst 999 has been used by a few viruses no good virus control should stop the program, (easy to check just change the port number to say 10000 on both server and client). More likely a firewall setting, if you are using XP Pro for the server and using default network settings ie firewall on, then the first time you ran the server XP should have given you a message that it was blocking some features of the program and given you the option to unblock.
                            To be more specific about error 57 from the client. It means that the client was unable to find the server in the timeout period. Error 24 (timeout) only occurs if a connection has been made to the server but a later response times out.
                            If you are on a LAN then your ADSL router will not need to port forward and depending on exactly how your LAN is set up using the computer name of the server may not work so the safest test is using the full server dotted IP address ie 192.168.1.2. If you are using DHCP from a router (standard DSL box) then just go to command prompt and run IPCONFIG /all which will tell you all you need.
                            John

                            Comment

                            Working...
                            X