Hay Guys, i want to write a simple NNTP client, which can connect to a server, send AUTHINFO details, and use GROUP and BODY to join a group and retreive posts.
I had a discussion with a couple of guys in here and they suggested using dataGramSockets and datGramPackets.
Could anyone provide a simple script to do these explaining how each command works and why use DataGram Sockets over the tradtional Socket? I used Socket and was able to connect to my server, but i hadn’t a clue how to use getInputStream() and getOutputStream() to send/receive data to the server.
Any help would be great.
Isn’t NNTP a TCP-based protocol ? I don’t think datagrams would be appropriate here. See the RFC for further info re. using this protocol.
I see that Apache Commons Net offer an NNTP package, which may be of use.
I’d avoid using raw sockets if someone has already done this hard work.