Solved

TCP/UDP in java package

Posted on 2003-11-08
4
344 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
network + 7 80
mapAB Challlenge 35 123
PDFBox - convert image to PDF, PDF resolution 3 115
JDeveloper 12c for 32 bit 4 68
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…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now