1 Reply Latest reply: Feb 12, 2007 9:35 PM by 800351 RSS

    trouble!

    807597
      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?
        • 1. Re: trouble!
          800351
          public class Client{
          
            public static void main(String[] args){
          
              Sockte soc = new Socket(...server...);
              Send send = new Send(soc);
              // or,
              // send(soc);
            }
          }