Boost logo

Boost Users :

Subject: Re: [Boost-users] Use of socket
From: Johan Mazel (johan.mazel_at_[hidden])
Date: 2009-01-23 09:54:10


Thanks a lot for the fast answer.

I have another question about the boost::mutable_buffer since they are used
to send and receive payload through the upd socket with the methods send_to
and receive_from.
I'd like to know how can I assign the content of a mutable_buffer to a char
* ?
I found the method buffer_cast (
http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/reference/mutable_buffer/buffer_cast.html)
but I don't really understand how to use it.

Thanks in advance for the help.
Johan

2009/1/22 Igor R <boost.lists_at_[hidden]>

>
>> udp::resolver resolver(io_service);
>>
>> udp::resolver::query query(udp::v4(), argv[1], "daytime");
>>
>> udp::endpoint receiver_endpoint = *resolver.resolve(query);
>>
>> udp::socket socket(io_service);
>> socket.open(udp::v4());
>>
>>
>> But, to send something else than a Daytime request, I need to know what
>> are the avalaible option to put instead of "daytime" in this line :
>>
>>
>> udp::resolver::query query(udp::v4(), argv[1], "daytime");
>>
>>
> udp::resolver::query query(udp::v4(), "192.168.1.10", "8080");
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net