I am programming a class that has multiple functions inside of it.
I want this class to have an
openconnection() function and various other functions that depend on the connection that is opened in the openconnection() function.
my problem is that the connection is opening fine in the openconnection() function but it is not persisting. it dies right when the openconnection function returns its value.
so the other functions that do any recv and sending don't work.
can anyone tell me how to keep a connection to stay open between function calls?
I want this class to have an
openconnection() function and various other functions that depend on the connection that is opened in the openconnection() function.
my problem is that the connection is opening fine in the openconnection() function but it is not persisting. it dies right when the openconnection function returns its value.
so the other functions that do any recv and sending don't work.
can anyone tell me how to keep a connection to stay open between function calls?