trouble!

i'm making a messenger client which has 4 classes.

Client

Sockets

Send

Receive

a thread t1 in client in binded to object of send. the run inside send will send messages using a PrintWriter object 'out' of sockect object soc which are delcared an inidialised in sockets. i have created an object of sockets in client. my problem is out.println(str) doesnot work in send as it cannot locate the variable out in sockets. how should i write the statement in send to send message using out of soc?

[532 byte] By [kothari_neerava] at [2007-11-26 18:08:43]
# 1

public class Client{

public static void main(String[] args){

Sockte soc = new Socket(...server...);

Send send = new Send(soc);

// or,

// send(soc);

}

}

hiwaa at 2007-7-9 5:40:28 > top of Java-index,Archived Forums,Socket Programming...