On Tue, 14 Oct 2008 13:45:25 +0200
Lorenz Breu <[EMAIL PROTECTED]> wrote:

> Hi guys
> 
> I am trying to implement some form of multicast capability in the
> MINA framework. I see that you have started to implement the classes
> for APR support. My first attempt therefor is to create a multicast 
> AprDatagramAcceptor. However the documentation of the APR stuff seems
> a bit on the minimal side. I now have some questions one of you
> APR-guys may be able to answer:
> 
> The receive method needs to return the SocketAddress of the sender of 
> the received datagram. How can I access that data using the APR API??
> Do I have to parse the received data at the byte level, or does APR
> somehow prepare that information in a struct somewhere?

I think this APR function is what you are looking for :
apr_status_t apr_socket_recvfrom( apr_sockaddr_t *from,
                apr_socket_t *  sock,
                apr_int32_t     flags,
                char *          buf,
                apr_size_t *    len      
        )

        
from :  Updated with the address from which the data was
received 
> 
> 
> On a different note, why did you never implement a simple multicast 
> acceptor using the MultiCastSocket of java.io? Is it just a
> performance thing? Thread management is done in the
> AbstractPollingIoAcceptor and should also work unchanged with
> java.net, or am I missing something?
> 
java.net is totally incompatible with AbstractPolling classes, if you
want to use that for implementing multicast you'll need to first write
a whole new UDP transport based on java.io.

sorry for the too short answer I'm very busy, I'll try to come back to
give you more clues later this week.

Julien

Attachment: signature.asc
Description: PGP signature

Reply via email to