Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Winsock or related object...?

 
Nick George
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been able to find no references anywhere to java and winsock. if this is undoable, can anyone tell me how to get two applications on two separate computers to talk?
 
Vladas Razas
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Socket, ServerSocket
 
Nick George
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot, and that works great...
BUT...
it only seems to work intracomputer.
How do i get two computers to talk (with applications)?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Winsock" is the name given to an old implementation of TCP/IP back in the days before Windows came with a TCP/IP stack built in. Nowadays, the term isn't used.
Java Sockets and ServerSockets are just like the sockets you'll find in the Windows API, and of course, being an implementation of the standard TCP/IP sockets abstraction, they interoperate with Windows sockets (or sockets on any other platform.) The Java code
Socket s = new Socket("www.yahoo.com", 80);
gives you a socket connected to the webserver at Yahoo. You can substitute other names and ports to talk to any other service at any other machine.
 
Nick George
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
much thanks, and i will erase Winsock from my vocabulary
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic