![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2007
Posts: 5
Rep Power: 0
![]() |
Need to figure out the best way to confirm a VNC connection...
I (or rather, a friend of mine) have created a little program that, upon clicking a button, sends a command similar to this one:
winvnc -connect dyndns.domain.com:5500 The utility is intended to be used by clients of mine who need tech support and need a simple way to get me connected to their computer. Right now, this command will run winvnc and send it's little icon to the task bar in the lower right corner by the clock, regardless of whether or not the connection was successful. In addition, I have a timer that appears on the screen with an End Session button below it for easy closure of the program and it's connection to me. I need to figure out the best way to confirm that the attempted connection brought about by the above command is successful. Upon success, the timer appears. If it's not successful, I'll have a popup that will notify the user, allow them to click Retry, Custom (IP address, if my dyndns service goes down) and finally a cancel button. How should this be done? |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 150
Rep Power: 1
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
Could we see the source code of what you have done so far? It might help.
__________________
SYNTAX ERROR ... |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
The source code might be useful, if one is trying to overmanipupulate.
VNC is a program that allows one to control a remote machine by presenting the desktop of the remote machine on the controller's machine, with associated mouse actions and commands being transmitted to the remote machine. The nature of the beast is that the controlled machine sets itself up as a client while the controlling machine sets itself up as a server. This means that the controlled machine must initiate the contact, and that it will control access by means of a password. What it is is a free application that performs (if controlled correctly) as a GoToMyPC. The controlling machine must know the controlled machines IP address. This presents problems when the controlled machine has a dynamic IP, rather than a fixed IP. One solution to this is for both parties to agree to use a dyndns service to stabilize the situation. I don't see the problem if control of the customer's machine is agreed upon. The client fires up VNC. You fire up VNC. The client gives you a password and their current IP address. You contact. You fix their problem. It's a done deal. If the client needs help, and you aren't aware of it, perhaps you should check your email or your phone messages. If your client doesn't need help, and you're just trying to access their machine, shame on you.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 | |
|
Newbie
Join Date: Oct 2007
Posts: 5
Rep Power: 0
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
Quote:
-------------- After thinking about it for a while, I determined the easiest way to do what I want is to have the program silently run netstat after an attempt to establish the connection occurs and pipe the output through a if>then that basically says, "If you see the phrase "5500 ESTABLISHED" in the piped output from netstat, then the connection has been established successfully; proceed to the next step." Piece of cake. |
|
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
No doubt you are correct. It's been 3 years since I used it, and the brain cells don't put off that many sparks, when rubbed together, anymore.
Let me generalize. I used it in a fully cooperative atmosphere. I didn't fire it up unless the clients asked me to. I then required them to give me a current IP (all of them had dynamic IPs), and we set up the passwords. They had the option of terminating the process at any time merely by halting the service. I felt that if they were in need, they could communicate with me by email or telephone. Usually, we were in contact by telephone at the time the connection was being made. This method totally precludes the necessity of having timers or retries. One just handles it verbally.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 | |
|
Newbie
Join Date: Oct 2007
Posts: 5
Rep Power: 0
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
Quote:
|
|
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
Don't blame you, but don't look for idiot proof. Soon as you get there, they'll just make a better idiot.
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#8 |
|
Newbie
Join Date: Oct 2007
Posts: 5
Rep Power: 0
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
|
|
|
|
|
|
#9 |
|
Not a user?
Join Date: Sep 2007
Posts: 245
Rep Power: 1
![]() |
Re: Need to figure out the best way to confirm a VNC connection...
Whenever I initiate a vnc session, it either connects and puts the desktop in a window for my viewing, or tells me the connection failed. But then, I have my vnc host set to automatically accept requests.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MySQL connection bottleneck? | Jimbo | Other Web Development Languages | 8 | Jun 28th, 2006 8:27 PM |
| SMTPlib - Connection reset by peer | Sane | Python | 2 | Jun 20th, 2006 5:40 PM |
| JDBC DB2 connection | Konnor | Java | 6 | Mar 10th, 2006 6:54 PM |
| Connection Pooling | java_roshan | Other Web Development Languages | 2 | Nov 28th, 2005 3:24 PM |
| connection reset by peer / bad file descriptor | opcis | Perl | 0 | Feb 10th, 2005 3:29 AM |