Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > TCP protocol in Java

Reply
Thread Tools

TCP protocol in Java

 
 
Bala Shanmuga Priyan
Guest
Posts: n/a
 
      03-06-2007
Hi all,
I would like to know is it possible to implement a transport
layer protocol such as TCP in java. Although its available in java.net
package, i like to create my own. Also is there any detailed
explanation for source code of java.net package.

Thanks in advance

 
Reply With Quote
 
 
 
 
Christian
Guest
Posts: n/a
 
      03-06-2007

Bala Shanmuga Priyan schrieb:
> Hi all,
> I would like to know is it possible to implement a transport
> layer protocol such as TCP in java. Although its available in java.net
> package, i like to create my own.


You can implement your own transport protocol by utilizing UDP .. UDP
gives you basically the Network layer and has nearly no data on
Transportlayer. Forming your own packets directly may not be allowed
based on what OS and what userrights you have, so there is no
implementation in java.

> Also is there any detailed
> explanation for source code of java.net package.
>
> Thanks in advance
>

 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      03-06-2007
Bala Shanmuga Priyan wrote:

> I would like to know is it possible to implement a transport
> layer protocol such as TCP in java. Although its available in java.net
> package, i like to create my own. Also is there any detailed
> explanation for source code of java.net package.


If you don't want to layer over UDP (as Christian has already suggested) then
you should be able to do it using a Java wrapper for the pcap library (pcaplib
or WinPcap).

I don't know whether pcap has Java wrappings available yet for sending packets
yet. I not then you'd have to write your own -- but in comparison to
designing, implementing, and testing, a transport-layer protocol, that should
be a doddle

-- chris



 
Reply With Quote
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      03-12-2007
Bala Shanmuga Priyan wrote:
> I would like to know is it possible to implement a transport
> layer protocol such as TCP in java. Although its available in java.net
> package, i like to create my own. Also is there any detailed
> explanation for source code of java.net package.


Java does not support raw sockets so you would need
to do something in C++ and use JNI.

Maybe look at http://www.savarese.org/software/rocksaw/ !

If it is for a real world problem: forget it and
focus on the higher level problems.

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TCP/UDP port or protocol-based routing J Cisco 1 02-06-2006 08:50 PM
Custom Protocol over TCP Jeffrey Spoon Java 6 01-01-2005 03:50 PM
Protocol Chart - Learn how to use a Protocol Analyzer news.comcast.giganews.com Wireless Networking 0 08-21-2004 04:35 PM
When i try to implement a server program giving UDP as protocol , it works fine , but if the same code is executed with TCP as protocol option, it gives an error. Tompyna Perl Misc 4 02-17-2004 06:51 PM
X.25 to TCP protocol translation Sascha E. Pollok Cisco 4 12-02-2003 04:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57