I have a question about socket programming in java :
supose I have socket already established between server and client,
in server :
ss = new ServerSocket(port);
Socket s = ss.accept();
ObjectOutputStream dos = new
ObjectOutputStream(s.getOutputStream());
in client :
socket = new Socket(host,port);
is it legal if in client I want two type of input stream from this socket
stream, ex :
ois = new ObjectInputStream(socket.getInputStream());
dis = new DataInputStream(socket.getInputStream());
I don't know if this the problem or not in my program, but the program
always stuck in
this statement after first I declare the type of input stream is dis and
then I change it into
ois = new ObjectInputStream(socket.getInputStream());
if I change the type back into DataInputStream again then there's no
problem