• Post Reply Bookmark Topic Watch Topic
  • New Topic

communication between 2 PC  RSS feed

 
Jessid Leon Velez Gutierrez
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I have a question (I dont know if it is kind of stupid) but I am going to ask, any way:

Is it posible to write an app that allows me to communicate two PCs connected to the Internet? Something like a chat...

I dont know if I am confused or confusing

Some light to do this??? Thanks a lot!!!
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Java is well suited to network applications like that. You can use RMI, sockets, JMS messaging, web protocols and others. Do you have experience with any of those?

Describe your usage scenarios a bit. What do users do? Will it feel more like peer-to-peer chat or more like a web application?

Somewhere between your usage needs and your experience we can probably find a direction that will work for you.
 
Jessid Leon Velez Gutierrez
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Stan. I am newbie in this topic. I want to write something like this: Two or more PCs are connected to Internet, and each one has a microcontroller attached to its serial port (I have resolved this part using RX-TX: http://www.rxtx.org/ )

I want to be able to communicate these PCs using some simple technique(?) or the simplest one possible to implement. That is all: one simple String from one pc to another...As you can see, Stan with my answer you can tell I am not even a beginner in this topic. I hope you can help me, at least with a list of places or sources where I can find some info...some light, jejeje

Thanks again
 
cj pangilinan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

if you want something like a chat, sockets will do. make one pc a server and other pcs clients. you can send plain text from pc to pc. this is like a telnet protocol.

use java.net.Socket and java.net.ServerSocket
 
Jessid Leon Velez Gutierrez
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks cj pangilinan. I am going to study what you have told me, and then I will let you know. Either if I solved the problem or if I am more confused than before...

Thanks again...

And Happy, Happy, Happy New Year to all of you, in Java Ranch...
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Sun networking tutorial gets you going nicely on a Socket client and server. It's a simple set of APIs and concepts but you have to do a fair bit of work on top of them. I'd encourage following this path first ... learn enough about sockets to appreciate whether the alternatives would make things better for you or not.

Networking Tutorial - See the socket chapter

RMI Tutorial
 
Jessid Leon Velez Gutierrez
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stan, thanks a lot. I will follow your advice and I will let you know about my progress...

good bye
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!