Hello
For example if i want to implement my own protocol, i can proceed by implementing the extra features on UDP on the application it self and thus achieving my task. But what if i want to implement it on the OS level just like TCP or any other protocol, i mean for example in Java we have a in built library which can provide TCP and UDP. Now how do these libraries provide the facility, do they implement it them selves , if yes then how do they connect to the network layer. Or else do they forward it to the Operating System which implements the TCP, for them. If not then who implements it and send the data to the network layer
Thanks for the help

Recommended Answers

All 3 Replies

If you need to ask this, then you definately do not need a new networking protocol, but simply want a new protocol on top of either TCP or UDP (like HTTP, SSH, most DB protocols, etc, etc, etc).

But still if i want to implement it, then how do i go about it, as far as i know it will involve programming at network io of the kernel and implementing the code there such that when ever one receives data from the network then the data will first goto my code and then depending on the protocol it can forward to either tcp( if it is tcp) or to my protocol ie depending on the header of ip datagram. My question is that in the java.net library how does java implement it. because it cant be the way as i mentioned, so there has to be some other way

It doesn't implement it, it uses what the systems provide, logically. To implement it, it would need to be able to reach must deeper into the OS (and probably the hardware) than Java is meant for, of course.

Edit: Besides, the JDK comes with the src. Look at those classes and follow them through and you will see for yourself where it "disappears" into the system with the "native" calls.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.