• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connection to remote machine

 
Mike Shn
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write a small application. However, this application must to conenct server(Unix machine).
The machine has static IP and port number that I know. I think that conenction would be at most 5-10 lines of code. Can someone can give me an advice how that can be done?

Thanks
 
Jon Dornback
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to make a connection via tcp or udp, you need to use the Socket class in java.net. documentation is here:
java.net API
without knowing more about what you are trying to do, that's about as good of explanation as I can give. please follow up with more info if you still need help.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't post the same message in more than one forum. You obviously read more than one forum, and so do the people who might answer your questions. Reading the same question multiple times is irritating and will probably lead to you receiving fewer useful answers.
This thread is now closed. All replies to the one in java in General (intermediate).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!