Solved

TCP/UDP in java package

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

757 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

20 Experts available now in Live!

Get 1:1 Help Now