Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set up a client-server application ?

 
Daniel Washington
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanna to creat a client-server application and need to transfer various kinds of information between C-S(ie,Client-Server),these information includes identity validation, talking and some others : And my question is : Can i declare numbers of inputstreams and outputstreams in a single socket connection just like " new data input stream( socket.getinput stream() )"?If yes , How can i do that ? If no , does that means i should create numbers of input(output)streams for each kinds of information using numbers of socket connection ? Tks in advance for your kindly help .
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use this forum for your question.
It can offer you better response.
 
Joe Ess
Bartender
Posts: 9370
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

new data input stream( socket.getinput stream() )

No. That would just create a new input stream object that references the socket's single input stream. It would be best if you walk through the Java Tutorial: Custom Networking to get a better sense as to what's going on behind the scenes. It would be a good idea to look at the Java Tutorial: IO as well.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!