J
Jan Liße
Hi,
i was wondering if it is possible to call a method (not run()) from a class,
that is already running
as a thread in the background. I want to do this, because i have got a main
class and from this
main class i start another class as background thread that works as a
receiver on a socket-connection.
But i need to send data over my socket too, and i am not sure if i should
place the method
for sending in my background-thread class, (if it is even possible) or if i
have too write a new
class just for the sending method. In the latter case i am not sure if it is
possible to pass one
object (my socket) from main-class to two other classes, working with the
same object.
I dont need the sending to be done in thread, besides.
Somehow confused about that,
thanks for any help!
Jan
i was wondering if it is possible to call a method (not run()) from a class,
that is already running
as a thread in the background. I want to do this, because i have got a main
class and from this
main class i start another class as background thread that works as a
receiver on a socket-connection.
But i need to send data over my socket too, and i am not sure if i should
place the method
for sending in my background-thread class, (if it is even possible) or if i
have too write a new
class just for the sending method. In the latter case i am not sure if it is
possible to pass one
object (my socket) from main-class to two other classes, working with the
same object.
I dont need the sending to be done in thread, besides.
Somehow confused about that,
thanks for any help!
Jan