Yes, this would be nice to have - both for TCP as well as UDP.

On Thu, Mar 27, 2014 at 8:02 PM, Bob Cowdery <[email protected]> wrote:

> Perhaps I can ask a more specific question and hopefully get some help.
> The parameter in socket.jl _uv_hook_recv() is addr::Ptr{Void} which as far
> as I can see from libuv source is a pointer to this:
>
> struct sockaddr_in uv_ip4_addr(const char* ip, int port);
>
> Can I dig out the ip and port in julia code or does this have to be done by 
> calling another C function. I see lots of ccall(jl_...) in socket.jl which I 
> assume are helper functions. I wonder if there is a suitable helper function 
> already.
>
> Bob
>
>
>
> On Tuesday, March 25, 2014 9:22:41 PM UTC, Bob Cowdery wrote:
>>
>> I'm sending a UDP broadcast  and getting a response using recv(). I need
>> to now start a conversation with the other end.
>>
>> As far as I can tell the _uv_hook_recv(sock::UdpSocket, nread::Ptr{Void},
>> buf_addr::Ptr{Void}, buf_size::Int32, addr::Ptr{Void}, flags::Int32) which
>> I believe is the read callback contains the host address (param addr). Is
>> there a way I can get hold of this please.
>>
>> Thanks
>> Bob
>>
>

Reply via email to