Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phunpack.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phunpack.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phunpack.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phunpack.html on line 8

PhUnpack()

Unpack transport data

Synopsis:

char * PhUnpack( PhTransportHdr_t *hdr, 
                 void **ret_struct );

Library:

ph

Description:

This function unpacks data packed using one of the PhTransport* or PtTransport* functions. Any memory required for the extraction is allocated via malloc().

The hdr parameter describes the data to be unpacked and is itself extracted from the packed data stream. See PhGetTransportHdr().

The pointer referenced by ret_struct is set to point to the newly unpacked data. The actual data representation of the data extracted is described in the hdr that's passed as the first parameter to this function.

As the data is unpacked, it's automatically endian-corrected.

Use PhFreeTransportType() to free data unpacked using this function.

Returns:

A pointer to the byte in the data stream following the data just extracted.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhAllocPackType(), PhFindTransportType(), PhFreeTransportType(), PhMallocUnpack(), PhPackEntry(), PhRegisterTransportType(), PhTransportRegEntry_t, PhTransportType()

Drag and Drop chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phunpack.html on line 116

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phunpack.html on line 116