Hey, i have a question about recv packets, can i do it in this style?
i want recv part of a packet to check a packet type and packet action then recv rest of the packet?
ex.
enum packet_type
{
type1 = 0,
type2 = 1,
type3 = 2...
}
then
switch( packet >> packet_type )
{
case : type1
{
packet >> x >> x;
...
}
case : type2
{
packet >> learnskill >> id;
...
}
...
?