Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Datagramchannels  RSS feed

 
Matthew Ballard
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what exactly does a datagramchannel do and how do i implement it.
i am making (belive it or not) a reliable UDP protocl.
i have a send method which uses a datagramsocket to send it, while at the same time have a thread to receive from the socket ACK pakcets from the receive host. yet, it seems that the super.receive call i'm making from the receive thread is never geting access to the socket.
the receive host is sending the acks but it looks as though since the send method is occuping the socket the receive thread can't access the socket to check for incomming packets!.
if you don't get the above i'll explain it again in a differnt way, but if you do, is channles the solution. or can you think of a better solution?

cheers.
ps i know its pos without threads, but threads are easier, so i want to try and get it going with them.

[ EJFH: Better subject line ]
[ May 18, 2005: Message edited by: Ernest Friedman-Hill ]
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one way to learn might be to read the standards of protocols that already do what you want to achieve. documents that might interest you include:
  • RFC 793, Transmission Control Protocol
  • RFC 768, User Datagram Protocol
  • RFC 3168, Explicit Congestion Notification (an optional addition to TCP/IP that affects how TCP works)

  • also useful: list of RFCs
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!