You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by satish viswanatham <sa...@gmail.com> on 2007/08/23 22:43:43 UTC

Sample UDP transport using Raw Sockets

Hi All,

I came across the following sample implementation. Is there better or
complete version of these sources?

I am only interested in the server (Acceptor) part, not worried about client
(Connector) part yet.

 For example the attached DatagramAcceptor.java  only receives the messages.
What about messages being written out? Starting another "WriterThread" seems
very crude implementation. I checked out the sources and looked at NIO
transport. I guess NIO design is slightly different because of its async
nature.

Even if I were to write another thread to receive "the writes done by the
server" , how does that thread get hold of the write requests.  Should I be
also implementing DatagramService? In that case will I get call back for the
writes?

http://www.astprice.ru/downloads/bio-20050616.zip

I am planning to use
Saverese<http://www.savarese.org/software/vserv-tcpip/api/org/savarese/vserv/tcpip/IPPacket.html>
raw sockets. If you have a MINA transport (UDP) using these socket. Please
let me know.

MINA looks nice, wish it had raw transport as well, because with that we
wont be able to use MINA.

thanks
Satish

On 8/6/07, Trustin Lee <tr...@gmail.com> wrote:
>
> On 8/7/07, satish viswanatham <sa...@gmail.com> wrote:
> > Sure. I can take a look at it. Is there any documentation or sample
> > Transport implementation?
>
> Unfortunately, there's no documentation on implementing a new
> transport yet.  You could take a look into an existing transport
> implementations.
>
> There are three implementations: NIO UDP, NIO TCP, and serial port
> communication.  You could start from NIO UDP or serial port
> communication transport implementation because they are quite simple.
> And please take advantage from this mailing list.  We will give you
> the answers for your questions asap.
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>