No announcement yet.

EchoServ / EClient Question

  • Filter
  • Time
  • Show
Clear All
new posts

    EchoServ / EClient Question


    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?

    Need to see some code that exhibites the problem.


      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.


        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? "


          Thanks for the tip Cliff.

          Unfortunately, it didn't work.


            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 the standard loopback IP.



              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, 02:52 PM.
              p purvis



                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.


                  If using a router, check router software that port 999 is being sent to your local machine, etc...
                  If using ZoneAlarm, check if port 999 is being blocked.
                  Last resort if the registry is corrupted:
                  Last edited by Mike Doty; 31 May 2008, 03:20 PM.


                    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 then "eclnt2ip"
                    if your computer is named workstation1 then "eclnt2ip workstation1"

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

                    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, 04:20 PM.
                    p purvis


                      "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.


                        Either machine Windows 98?


                          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.


                            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 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.