Solved

TCP/UDP in java package

Posted on 2003-11-08
4
349 Views
Last Modified: 2006-11-17
Is there such thing as a TCP class in the java package?   Suppose if I want to send the data over a network using TCP or UDP.   For would I decide which one I want to use?   I know that you can implement your own protocol but if you want to use TCP or UDP, how is that possible?   I wanted to know since I couldn't find a class related to TCP or UDP in the java package.   A little explanation on how this works is appreciated.   Thanks.  
0
Comment
Question by:skyblue01
  • 3
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 100 total points
ID: 9707690
All the TCP/IP classes are in the java.net package. The main ones are

Socket
ServerSocket
Datagram
URLConnection
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9707693
Sorry - not - 'Datagram' - i meant

DatagramSocket
DatagramPacket
0
 

Author Comment

by:skyblue01
ID: 9707731
Thanks.   So I guess for all the connections that uses Socket and ServerSocket are in fact TCP.   This will then indicate that for data sent using these TCP connections, I shouldn't be losing any data or getting delays along the way -- is that right?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9707742
>>So I guess for all the connections that uses Socket and ServerSocket are in fact TCP.

Yes

>>shouldn't be losing any data or getting delays along the way -- is that right?
     
Shouldn't be no, so to answer your other question 'informally', the problem with unexpected data is probably a logic error

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Facing this issue for maven proxy setting 2 25
sql import cannot be resolved jsp 3 72
Is there a simpler dropbox system? 10 44
Coding for the first time 9 62
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question