how to disconnect from FTP host server while still executing? - vb6

I'm using Inet1.Ocx in a vb6 project to connect to a remote host.
I was wondering, is there anything to do to disconnect from server while still executing ?
i will explain more,
i write the host name and user name and password and hit (Connect) button but i find out that i misspelled the host name, while the status of the connection (Still Connecting) i attempt to disconnect to re-write the host name, but i get a message error (Still executing the last connection) ... how can i terminate the (Last connection) while (Still executing) ?!

Have the connection and login on a seperate form and then add a disconnect button which closes the form and the connection.
http://www.bigresource.com/VB-How-to-Close-FTP-connection-using-inet-MntXMWW4FX.html
This might help ;)

Related

ORA-03135: connection lost contact

I am getting the error as 'ORA-03135: connection lost contact' from my C# code while making connection to oracle DB. The same job works just fine from our test server. But it failed with ORA-03135: connection lost contact error from prod server.
The C# code use ODAC to connect to oracle DB.
Appreciate your inputs.
Thank you
This error is most likely caused by a firewall blocking the connection request. Check for any firewalls in your network or on the database server and make sure your access rules are configured correctly.
Also check this link for more troubleshooting tips: http://www.dba-oracle.com/t_ora_03135_connection_lost_contact.htm
ORA-03135: connection lost contact tips
What can I do to avoid the ORA-03135 error?
Answer: The oerr utility shows this for the ORA-03135 error:
ORA-03135: connection lost contact
Cause:
1) Server unexpectedly terminated or was forced to terminate.
2) Server timed out the connection.
Action:
1) Check if the server session was terminated.
2) Check if the timeout parameters are set properly in
sqlnet.ora.
The ORA-03135 error is common when connecting remotely when a firewall
terminates the connection.
One solution for the ORA-03135 error is to increase the value of the
sqlnet.ora expire_time parameter in the sqlnet.ora file or to check
for a expire parameter in a SQL*Plus profile.
To diagnose the ORA-03135 error, start by checking to see if the OS
PID still exists, using the "ps -ef | grep" syntax.
Check to see if there is a Network Address Translation (NAT) between
the client and server
In Windows, check to see if a Windows firewall is checking for your
local connections.
...
Also, setting the parameters sqlnet.inbound_connect_timeout and
inbound_connect_timeout_listenername to 0 can stop the ORA-03135
error.

How can I check I am actually connected to the internet

I am using Indy to connect to an Ftp server. We have had problems with the server being down, creating a "Host not found" error, which I handle and indicate to the user, however, today the software was installed on a computer that did not have an internet connection. The error produced when I "Connect" is also "Host not found", which is not totally correct. Is there a function/procedure I can call inside the TIdFtp component that will tell me if there is actually a connection to the internet so I can display an error indicating the user is not connected? I am using Delphi XE Seattle.
I have looked through the list of IdFtp properties/functions etc, but nothing seems obvious.
Is there a function/procedure I can call inside the TIdFtp component that will tell me if there is actually a connection to the internet so I can display an error indicating the user is not connected?
No. What you will have to do is attempt a TCP connection to several different servers and see if any of them succeed or if they all fail. For instance, you can use TIdTCPClient to connect to well-known server ports that are pretty much guaranteed to be online 99+% of the time, like google.com/yahoo.com on port 80 (HTTP) or 443 (HTTPS), etc.

How to auto connect with Soket.io

I'm creating a webapp that support offline mode using AppCache.
When I'm online, it connect fine. If the connection is dropped and regain, it reconnect correctly.
My problem is when I'm opening my webapp when disconnected and then a connect to the internet, Socket.IO doesn't connect. It just doesn't try to connect.
I analysed a little bit the code, and it seen that it need a first valid connection in order to try to reconnect. If the first connection fail, it will permanently fail.
Is there something I miss?
So what stops you to have a global variable isConnectionStartedOnce, initialize it on the first successful connection. And on re connection event if it is initiaziled - reconnect, otherwise connect from scratch.

ssh multithread server remains blocked in ssh_bind_accept

I implemented an SSH server using libssh 5.5.
Running a single ssh client connecting to the server on port 22, all works fine.
The problem arises when I try to connect a second client (I use PUTTY ssh terminal as clients). The server thread waiting for a client connection in ssh_bind_accept is not activated, and the newly opened (second) terminal is obviously 'dead' (the first open
terminal works correctly).
I wonder if there is something important to set that I'm missing.
Here are the calls i perform:
1. Create the session:
sshbind = ssh_bind_new();
session = ssh_new();
2. Call the listen:
ssh_bind_listen(sshbind)
3. Call the accept:
ssh_bind_accept( sshbind, session )
4. Open a putty terminal, which unlocks the *ssh_bind_accept* at step 3
5. Create a new thread and continue terminal dialogue in newly created thread
Basically, the server I developed is based on the sample here: How to use libssh as server?
Having to support multiple client terminals, I have a listener,
and when a connection is created (return from ssh_bind_accept), I create a new thread and continue the ssh connection there. After forking, I create new bind and session, and put myself waiting in ssh_bind accept.
The problem is that opening a second terminal, doesn't cause the ssh_bind_accept to return.
Did you try to do a ssh_bind_free(sshbind) in the child process after having forked ? It is possible that having the listener file descriptor in multiple processes at same time causes problem.
Aris

Oracle listener create logon

I would like to prepare listner in another port but I have got problems you can see this in picture with I added below. Also I would like to connect to dabase using this "listener" and check connection in CMD using easy connect.
My username: rafal password:oracle
listener in 1521 is working but in another port I have got problem
"No listener" error indicates either that you're reaching the wrong server, or the right server on the wrong port, or that the listener is not started. I would start by checking that the listener is started, since you can reach the other one.

Resources