Read the first answer more carefully. It's not quite that simple.
I'll try to explain whats going on in the background, and that might shed some light on why it's not that simple. A datagram has a header and a payload. The header needs to contain information on where the packet is going. This is so it can be easily be routed through complicated networks - for example, to send something over the internet, you need a destination ip address. This is not the case for unix stream sockets, which are more like names pipes.
In the olden days, we used switches to make networks. There kind of like routers - but with one big difference. Each packet is sent to each computer! So, a server needed to be aware of what it's address was so it could ignore packets that's not addressed to it.
It's a tcp server.
Then why are you using datagrams? Datagrams are used in UDP/IP. TCP/IP uses an enturely different system. Unless your trying to say your manually implementing TCP over UDP/Ip. In which case, you're doing something very stange indeed.
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"