473,386 Members | 2,050 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,386 software developers and data experts.

Socket reconnect problem

37
Hello everybody

I am working on a client application that connects to a C# server using the Socket class. I am trying to handle the case in which the server goes offline, and I would like the client to try to reconnect after the previous connect times out.

Currently I try to re-connect on the IOErrorEvent.IO_ERROR event handler. The issue is that it seems like the socket is not trying to make another connection.

I've seen the following post http://stackoverflow.com/questions/8939/actionscript-3-0-sockets-cant-reconnect , but I was wondering if somebody knows a method for achieving socket reconnection, or a good way to handle situations in which server is unavailable.

Thanks in advance
Dec 11 '09 #1
0 2323

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Thomas Hervé | last post by:
My problem is not really python specific but as I do my implementation in python I hope someone here can help me. I have two programs that talk through a socket. Here is the code : <server>...
6
by: Sharon | last post by:
Hi all. I'm trying first time async socket connection. In all the examples i've seen, the server connection is closed when the message is complete. Is it common to close the connection after...
18
by: nephish | last post by:
lo there, i have a simple app that connects to a socket to get info from a server i looks like this serverhost = 'xxx.xxx.xxx.xxx' serverport = 9520 aeris_sockobj =...
1
by: Jay | last post by:
I have a client app sending messages over the socket on a certain port. In the client app: I do this for every message I need to send: 1. Create a socket and connect. 2. Send message 3. Close...
0
by: Kursat | last post by:
Hi, I developed a socket client application which connects to a server application and axchange some data. I test Connected property of the socket object and try to reconnect if its value is...
15
by: dennis.richardson | last post by:
Greetings all. Here's a problem that's been driving me nuts for the last 48 hours. I'm hoping that someone has come across this before. I have a C# Application that reads a UDP broadcast...
6
by: Diego F. | last post by:
Hello. I'm writing an application that manages sockets and has a message protocol. I connect to another machine and I have to send and receive certain messages. I need the possibility to...
2
by: dougmcmurtry | last post by:
I have an Asynchronous socket that sends data to a server for credit card approvals. The socket is kept alive by the server through a heartbeat that sends a "beat" every 90 seconds. Trouble is that...
3
by: Jason Kristoff | last post by:
I'm trying to make something that once it is disconnected will automatically try to reconnect. I'll add some more features in later so it doesn't hammer the server but right now I just want to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.