Give ENet a smaller MTU than the real one by the max possible size of your theoretical platform.  In the enet platform specific call to send the data, prepend or append your extra voice data.  In the enet platform specific call to recieve data, pull this off before passing back to enet.<br>
<br><div class="gmail_quote">On Thu, Apr 14, 2011 at 7:13 AM, Sergio Martin <span dir="ltr"><<a href="mailto:smartin@freedomfactorystudios.com">smartin@freedomfactorystudios.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I ported enet to xbox 360 and ps3. That's the reason why I cannot be more specific (NDAs).<br>
<br>
Currently, enet works on both flawlessly. It's just I cannot send voice data over standard UDP sockets, unfortunately.<br>
<br>
<br>
El 14/04/2011 14:54, Ross Linder escribió:<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes I have been reading this thread and it does not make sense, Sergio it<br>
allmost sounds like you want to use Enet to send a customised UDP packet to a<br>
hardware device that is not running Enet.<br>
<br>
If this is the case I think you are on the wrong approach, you should just use<br>
raw sockets.<br>
<br>
If not then the format of the packet is not critical since you will encode and<br>
decode the data to be sent/received via Enet in your code. Changing Enet<br>
would still be the wrong approach IMO. Enet can be viewed as a transport<br>
system for your data.<br>
<br>
Regards Ross<br>
--<br>
<br>
On Thursday 14 April 2011 14:15:07 Daniel Aquino wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What are you developing for?  Why does the device force you to follow this<br>
approach?<br>
<br>
I wonder if just like there is win32.c and unix.c you could simply<br>
implement your own backend which strips out the message part of the network<br>
packet and passes that to enet.. This way you don't have to modify enet at<br>
all..  Enet will build it's packet and send it to your custom backend where<br>
you can wrap it in your desired format.<br>
<br>
As long as your packets aren't very large and your sending frequently you<br>
shouldn't have to worry about fragmentation.<br>
<br>
<br>
<br>
On Thu, Apr 14, 2011 at 7:56 AM, Sergio Martin<<br>
<br>
<a href="mailto:smartin@freedomfactorystudios.com" target="_blank">smartin@freedomfactorystudios.com</a>>  wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
  What about all the other people that use enet?<br>
<br>
<br>
These change are only intended for my project.<br>
It's not like I'm going to commit to the enet CVS :D<br>
<br>
  Why don't you implement code to create packets and send them using enet.<br>
<br>
<br>
I have already a message class for that. But I need to send UDP packets<br>
in this very specific form over a custom network. Just to give you a<br>
clue, I'm not developing for the PC ;-)<br>
<br>
El 14/04/2011 13:27, Jay Sprenkle escribió:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sergio,<br>
The pattern you've chosen sounds fine.<br>
I don't think changing enet to meet your requirements is a good idea<br>
though.<br>
What about all the other people that use enet?<br>
Why don't you implement code to create packets and send them using enet.<br>
That's how it's intended to be used.<br>
It works just fine for me.<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Thu, Apr 14, 2011 at 5:40 AM, Sergio Martin<br>
<<a href="mailto:smartin@freedomfactorystudios.com" target="_blank">smartin@freedomfactorystudios.com</a><br>
<mailto:<a href="mailto:smartin@freedomfactorystudios.com" target="_blank">smartin@freedomfactorystudios.com</a>>>  wrote:<br>
<br>
    Hi,<br>
<br>
    In order to meet our client custom network requirement, I need to<br>
    send each UDP packet data as following:<br>
<br>
    [ size_of_game_data ] [ game_data ] [ voice_data ]<br>
<br>
<br>
    How difficult would be to modify ENet behaviour to meet that pattern?<br>
    I'm not sure how to deal with ENet's packet fragmentation.<br>
<br>
    I'm thinking of adding to ENetPacket struct two new variables:<br>
    enet_uint8 * voiceData;             /**<  allocated voice data for<br>
    packet */<br>
    size_t           voiceDataLength;  /**<  length of voice data */<br>
<br>
    Change: enet_packet_create (const void * data, size_t dataLength,<br>
    enet_uint32 flags)<br>
    To this: enet_packet_create(const void * data, size_t dataLength,<br>
    const void * voiceData, size_t voiceDataLength, enet_uint32 flags)<br>
<br>
    And then modify the rest of ENet to support it.<br>
<br>
<br>
    Is this the correct approach?<br>
<br>
<br>
    Best Regards,<br>
    Sergio Martin.<br>
<br>
    _______________________________________________<br>
    ENet-discuss mailing list<br>
    <a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><mailto:<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a>><br>
    <a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br>
<br>
<br>
<br>
--<br>
---<br>
"The great thing about Object Oriented code is that it can make small,<br>
simple problems look like large, complex ones."<br>
</blockquote>
<br>
_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
</blockquote></blockquote>
<br>
<br>
_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
</blockquote>
_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
</div></div></blockquote></div><br>