473,323 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

HELP: How can I timeout a TCP Client?

I have written a TCP/IP server and a program to monitor whether the
server is running. To determine whether or not the server is running
I simply attempt to connect to the port on which the server listens
and jump out to a Catch block if the connection fails. I have
discovered that there are times when the server is still listening but
is unable to respond. I would then like to modify the server monitor
as follows:
Connect to the server. If no response, exit to Catch block and take
appropriate action. If the server does answer, send login
information. If server responds everything is okay. If the server
doesn't answer in 15 seconds (normal response time is immediate) then
assume server has failed and take appropriate action.

Any suggestions as to how to include a timer event inside the code
that is listening for a response from the server?

TIA
Nov 21 '05 #1
4 1722
Matthew,

What does it matter what you are doing when you only want to be signaled
after 15 seconds.

For that should the forms timer be very much sufficient, assuming that you
are using a form.

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps

Cor
Nov 21 '05 #2
Matthew,

What does it matter what you are doing when you only want to be signaled
after 15 seconds.

For that should the forms timer be very much sufficient, assuming that you
are using a form.

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps

Cor
Nov 21 '05 #3
I'm not using a form, just a compiled module. The monitoring program
actually runs as a scheduled task and its purpose is to page me if the
server process goes down.
Matthew,

What does it matter what you are doing when you only want to be signaled
after 15 seconds.

For that should the forms timer be very much sufficient, assuming that you
are using a form.

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps

Cor


Nov 21 '05 #4
I'm not using a form, just a compiled module. The monitoring program
actually runs as a scheduled task and its purpose is to page me if the
server process goes down.
Matthew,

What does it matter what you are doing when you only want to be signaled
after 15 seconds.

For that should the forms timer be very much sufficient, assuming that you
are using a form.

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps

Cor


Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Carson Saunders | last post by:
I have a C# client application that calls a web service. I implement the CookieContainer class on the client to ensure the session is kept. However, I'm having trouble with the session timeout. I...
2
by: Lisa Pearlson | last post by:
Hi, My php application (on Apache/Linux) needs to do the following: The PHP script receives a request from a client (binary), asking for certain records of data. My PHP script loops through...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: Dan | last post by:
All, I have a Web Service that validates a piece of data. However, the database that the data comes from is mamouth. So, it may take a long time for the validation query to complete. ...
8
by: Komandur Kannan | last post by:
We have a smart device application running on handhelds(Symbol MC9000G). The backend is Oracle and a middle tier web services development done in Vb.net. We use pessimistic Locking due to...
4
by: A.M-SG | last post by:
Hi, How can I increase the HTTP Timeout value at the client side? Thank you, Alan
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
7
by: The Man | last post by:
Hello All: I am in desparate need of assistance. We are using an application called PaperVision Enterprise which takes scanned invoices and puts them into a database for the purpose of easy...
3
by: TC | last post by:
Hey All, I have some classes that I recently built for a website which uses the HttpWebRequest & HttpWebResponse objects from the System.Net namespace. Basically, the classes rap submitted data...
1
by: alvinstraight38 | last post by:
I have a client who has been receiving hundreds of SQL timeout error messages in their error logs. Specifically, the message looks like this: MESSAGE :...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.