Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
i have two packet Classes ,
1- CommandPacket:
PHP
class CommandPacket {
        /** @var CommandPacketHeader */
        private $header;
        private $data;
}

and 2- CommandPacketHeader :
PHP
class CommandPacketHeader {
        /** @var integer Cardinal */
        private $headerSize;
        /** @var array Description */
        private $signature;
        /** @var integer Cardinal */
        private $version;
        /** @var integer UInt64 */
        private $highSessionID;
        /** @var integer Description */
        private $lowSessionID;
        /** @var integer enum */
        private $commandID;
        /** @var integer Cardinal */
        private $dataSize;
}


I want to know how can i split an object into chunks and send them with socket_sendto function?

socket_sendto( resource $socket , string $buf , int $len , int $flags , string $addr [, int $port = 0 ] )
Posted
Updated 27-Oct-13 2:24am
v2

1 solution

You already posted this at http://www.codeproject.com/Messages/4688029/how-can-i-split-an-object-into-chunks-and-send-the.aspx[^]. Please read the guidelines and use one forum only.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900