File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes SOCKET Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "SOCKET" Watch "SOCKET" New topic


Ranch Hand

Joined: Nov 21, 2000
Posts: 71
Hi everyone,
I found a question regarding socket, which I am finding it difficult to answer. The question is " How are connectionless sockets are different than connection-oriented sockets?"
1)Connectionless sockets can transmit to multiple receivers at the same time.
2)Connectionless sockets support only character streams.
3)Connectionless sockets are less efficient and slower
4)Connectionless sockets do not support two-way communication
5)Connectionless sockets do not gurantee delivery or order of receipt.
Please not that there is only one correct answer to this question out of five choices. Please help urgently.
Thanks in advance
Nilesh patel.
Vladan Radovanovic
Ranch Hand

Joined: Mar 20, 2000
Posts: 216
I would say number 5.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
If I remember right, connectionless sockets are using UDP and connection-based sockets are using TCP/IP. TCP/IP guarantees that each data packet is received and UDP does not. TCP/IP is nice and sturdy that way, but it has more overhead than UDP.
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
Guaranteed delivery might cause problems in certain situation if it is delayed. The good example would be VoIP. TCP does not work well in which case.
I agree. Here's the link:
subject: SOCKET
It's not a secret anymore!