Meaningless Drivel is fun!
The moose likes Java in General and the fly likes Winsock or related object...? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Winsock or related object...?" Watch "Winsock or related object...?" New topic

Winsock or related object...?

Nick George
Ranch Hand

Joined: Nov 17, 2003
Posts: 38
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

Joined: Dec 02, 2003
Posts: 385
Socket, ServerSocket
Nick George
Ranch Hand

Joined: Nov 17, 2003
Posts: 38
Thanks alot, and that works great...
it only seems to work intracomputer.
How do i get two computers to talk (with applications)?
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

"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("", 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.

[Jess in Action][AskingGoodQuestions]
Nick George
Ranch Hand

Joined: Nov 17, 2003
Posts: 38
much thanks, and i will erase Winsock from my vocabulary
I agree. Here's the link:
subject: Winsock or related object...?
It's not a secret anymore!