473,657 Members | 2,537 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

timed actions

Hi

How do i set a socket to wait for a reply after a set time frame? For
example the following scenarios:

1) Give a user 10 seconds to respond after which time send an automatic
message to the server from the client to do a default action
2) set a time limit to give the server time to respond before continuing

I have a lobby as part of my project and i need the lobby data to be
retrieved from the server. I do this by initialising a lobby object on the
server when it starts. All clients who connect send a request for the lobby
and i then serialise this object and send it to the client who deserialises
it initialising their local object to an exact copy of the server lobby
object at that point.

So i would like to set some form of time frame not only for general timeouts
but for making sure my client has the lobby data before continuning. Whats
the best way?

Feb 20 '06 #1
2 2146
Hello, Daniel!

D> How do i set a socket to wait for a reply after a set time frame? For
D> example the following scenarios:

D> 1) Give a user 10 seconds to respond after which time send an automatic
D> message to the server from the client to do a default action
D> 2) set a time limit to give the server time to respond before continuing

Does user interact via graphical user interface (GUI)? If so you can consider timed actions on the GUI level.
You can use System.Windows. Forms.Timer for the purpose of timed events...

OTOH you can use System.Threadin g.Timer if you want the timed event to be executed on the level of network I/O
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 20 '06 #2
Did you find an answer to this?

I’m looking for some vb.net syntax for binding an event to a thread that I
can abort after a few seconds when the udpclient connection fails to get a
response. This is part of a forms based application. I'm passing some values
in the processing.

segue

"Daniel" wrote:
Hi

How do i set a socket to wait for a reply after a set time frame? For
example the following scenarios:

1) Give a user 10 seconds to respond after which time send an automatic
message to the server from the client to do a default action
2) set a time limit to give the server time to respond before continuing

I have a lobby as part of my project and i need the lobby data to be
retrieved from the server. I do this by initialising a lobby object on the
server when it starts. All clients who connect send a request for the lobby
and i then serialise this object and send it to the client who deserialises
it initialising their local object to an exact copy of the server lobby
object at that point.

So i would like to set some form of time frame not only for general timeouts
but for making sure my client has the lobby data before continuning. Whats
the best way?

Apr 7 '06 #3

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

Similar topics

2
3917
by: Andy | last post by:
Hi Gang Is there any way with ASP that I can tell if a user session has timed out? The problem is that we have a database app where a user session may time out. After this happens the user may try to save the data that is on there screen (without knowing they've timed out). I think what happens then (after the save) is that we get zero's in some of the fields in the database because the session has timed out.
2
1628
by: Javaman59 | last post by:
I have a GUI which is monitoring a real-time device. I have several timed actions, such as periodic polling of the device, and indicators which flash for a fixed period. My first implementation of this was to replicate the way I have seen this done before - have one central timed method, which is on a timer tick, and use time variables to keep track of when events are due. I have now realized that I can avoid the timer method, and time...
2
7856
by: William F. Robertson, Jr. | last post by:
Some of my users are receiving an error: Server Error in '/' Application. ---------------------------------------------------------------------------- ---- Request timed out. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
0
3821
by: Jack Wright | last post by:
Dear All, I have a web Application "http://localhost/Web/WebForm1.aspx" that calls a WebService from "http://localhost/webserviceapp/service1.asmx"...I have set the executionTimeout to 10 secs in Web.Config where my WebService is installed. <httpRuntime executionTimeout="10" appRequestQueueLimit="2" /> When I call a method "TestPlan" which takes more than 10 secs my web Page gets the following error:
5
9023
by: Sachin Surana | last post by:
We use HttpWebRequest to send the request at a URL. But some times the method GetResponse throws a time out exception. But when we check the IIS logs, there is no such entry. So the request never reached the server but the client is getting a time out exception. What could be the possible reasons? Confirmed that the request does not get lost in the network.
6
3784
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps v1.1.4322(_LM_W3SVC_1_Root_ATV2004)\Compilations
4
2928
by: Joe | last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located. When trying to add a web reference to a C# project I get an error message 'There was an error downloading 'http://mydomain.com:port/webservice.asmx' The operation has timed-out (I've tried with and without using a separate port for the service) The weird thing is the page does show up on the left side of the screen listing the available methods but the Add...
2
25458
by: tlan | last post by:
Hi, I got this error when I move my web service to Windows2003 server. I spent hours scouting on the internet and could find any answer. Please help!!! I the webservice is timeout between 1 -2 minutes when my web app, which consume this webService, retrieves a large amount of data. When I perform the same operation to retrieve smaller amount of data, it works fine. The timeout value I set for my web app, web service, and sql
10
19142
by: Jim Underwood | last post by:
I am having a problem with my web page timng out while retrieving a long runnign report (90-120 seconds. I have tried modifying several settings in various places and cannot get it to run for more than 90 seconds. I am running VS.Net and the app is ASP.Net, written using VB.Net. The app calls an asp.Net web service to retrieve the report. Both the web site and the web service are running locally on my PC. I have tried modifying the...
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.