#include "MagickCore/studio.h"#include "MagickCore/cache.h"#include "MagickCore/cache-private.h"#include "MagickCore/distribute-cache.h"#include "MagickCore/distribute-cache-private.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/geometry.h"#include "MagickCore/image.h"#include "MagickCore/image-private.h"#include "MagickCore/list.h"#include "MagickCore/locale_.h"#include "MagickCore/memory_.h"#include "MagickCore/memory-private.h"#include "MagickCore/nt-base-private.h"#include "MagickCore/pixel.h"#include "MagickCore/policy.h"#include "MagickCore/random_.h"#include "MagickCore/registry.h"#include "MagickCore/splay-tree.h"#include "MagickCore/string_.h"#include "MagickCore/string-private.h"#include "MagickCore/version.h"#include "MagickCore/version-private.h"Defines | |
| #define | CLOSE_SOCKET(socket) |
| #define | HANDLER_RETURN_TYPE void * |
| #define | HANDLER_RETURN_VALUE (void *) NULL |
| #define | SOCKET_TYPE int |
| #define | send(file, buffer, length, flags) 0 |
| #define | recv(file, buffer, length, flags) 0 |
| #define | DPCHostname "127.0.0.1" |
| #define | DPCPendingConnections 10 |
| #define | DPCPort 6668 |
| #define | DPCSessionKeyLength 8 |
| #define | MSG_NOSIGNAL 0 |
Functions | |
| static MagickOffsetType | dpc_read (int file, const MagickSizeType length, unsigned char *magick_restrict message) |
| static int | ConnectPixelCacheServer (const char *hostname, const int port, size_t *session_key, ExceptionInfo *exception) |
| static char * | GetHostname (int *port, ExceptionInfo *exception) |
| MagickPrivate DistributeCacheInfo * | AcquireDistributeCacheInfo (ExceptionInfo *exception) |
| MagickPrivate DistributeCacheInfo * | DestroyDistributeCacheInfo (DistributeCacheInfo *server_info) |
| static MagickBooleanType | DestroyDistributeCache (SplayTreeInfo *registry, const size_t session_key) |
| static MagickOffsetType | dpc_send (int file, const MagickSizeType length, const unsigned char *magick_restrict message) |
| static MagickBooleanType | OpenDistributeCache (SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception) |
| static MagickBooleanType | ReadDistributeCacheMetacontent (SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception) |
| static MagickBooleanType | ReadDistributeCachePixels (SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception) |
| static void * | RelinquishImageRegistry (void *image) |
| static MagickBooleanType | WriteDistributeCacheMetacontent (SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception) |
| static MagickBooleanType | WriteDistributeCachePixels (SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception) |
| static HANDLER_RETURN_TYPE | DistributePixelCacheClient (void *socket) |
| MagickExport void | DistributePixelCacheServer (const int port, ExceptionInfo *exception) |
| MagickPrivate int | GetDistributeCacheFile (const DistributeCacheInfo *server_info) |
| MagickPrivate const char * | GetDistributeCacheHostname (const DistributeCacheInfo *server_info) |
| MagickPrivate int | GetDistributeCachePort (const DistributeCacheInfo *server_info) |
| MagickPrivate MagickBooleanType | OpenDistributePixelCache (DistributeCacheInfo *server_info, Image *image) |
| MagickPrivate MagickOffsetType | ReadDistributePixelCacheMetacontent (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *metacontent) |
| MagickPrivate MagickOffsetType | ReadDistributePixelCachePixels (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *magick_restrict pixels) |
| MagickPrivate MagickBooleanType | RelinquishDistributePixelCache (DistributeCacheInfo *server_info) |
| MagickPrivate MagickOffsetType | WriteDistributePixelCacheMetacontent (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, const unsigned char *metacontent) |
| MagickPrivate MagickOffsetType | WriteDistributePixelCachePixels (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, const unsigned char *magick_restrict pixels) |
| #define CLOSE_SOCKET | ( | socket | ) |
| #define DPCHostname "127.0.0.1" |
Referenced by GetHostname().
| #define DPCPendingConnections 10 |
Referenced by DistributePixelCacheServer().
| #define DPCPort 6668 |
Referenced by GetHostname().
| #define DPCSessionKeyLength 8 |
Referenced by DistributePixelCacheClient().
| #define HANDLER_RETURN_TYPE void * |
| #define HANDLER_RETURN_VALUE (void *) NULL |
Referenced by DistributePixelCacheClient().
| #define MSG_NOSIGNAL 0 |
Referenced by dpc_send().
| #define recv | ( | file, | |||
| buffer, | |||||
| length, | |||||
| flags | ) | 0 |
Referenced by ConnectPixelCacheServer(), and dpc_read().
| #define send | ( | file, | |||
| buffer, | |||||
| length, | |||||
| flags | ) | 0 |
Referenced by dpc_send().
| #define SOCKET_TYPE int |
Referenced by ConnectPixelCacheServer(), DistributePixelCacheClient(), and DistributePixelCacheServer().
| MagickPrivate DistributeCacheInfo* AcquireDistributeCacheInfo | ( | ExceptionInfo * | exception | ) |
References AcquireCriticalMemory(), ConnectPixelCacheServer(), CopyMagickString(), _DistributeCacheInfo::debug, DestroyDistributeCacheInfo(), DestroyString(), _DistributeCacheInfo::file, GetHostname(), _DistributeCacheInfo::hostname, IsEventLogging(), MagickCoreSignature, MagickPathExtent, _DistributeCacheInfo::port, _DistributeCacheInfo::session_key, and _DistributeCacheInfo::signature.
| static int ConnectPixelCacheServer | ( | const char * | hostname, | |
| const int | port, | |||
| size_t * | session_key, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
References AcquireStringInfo(), CacheError, CLOSE_SOCKET, DestroyString(), DestroyStringInfo(), FormatLocaleString(), GetMagickModule, GetMagickSignature(), GetPolicyValue(), GetStringInfoDatum(), MagickFalse, MagickPathExtent, MagickTrue, MissingDelegateError, recv, SOCKET_TYPE, and ThrowMagickException().
Referenced by AcquireDistributeCacheInfo().
| static MagickBooleanType DestroyDistributeCache | ( | SplayTreeInfo * | registry, | |
| const size_t | session_key | |||
| ) | [static] |
References DeleteNodeFromSplayTree().
Referenced by DistributePixelCacheClient().
| MagickPrivate DistributeCacheInfo* DestroyDistributeCacheInfo | ( | DistributeCacheInfo * | server_info | ) |
References CLOSE_SOCKET, _DistributeCacheInfo::file, MagickCoreSignature, RelinquishMagickMemory(), and _DistributeCacheInfo::signature.
Referenced by AcquireDistributeCacheInfo(), DestroyPixelCache(), and OpenPixelCache().
| static HANDLER_RETURN_TYPE DistributePixelCacheClient | ( | void * | socket | ) | [static] |
References AcquireExceptionInfo(), AcquireRandomInfo(), CacheFatalError, CLOSE_SOCKET, CopyMagickString(), DestroyDistributeCache(), DestroyExceptionInfo(), DestroyRandomInfo(), DestroySplayTree(), DestroyString(), DestroyStringInfo(), dpc_read(), dpc_send(), DPCSessionKeyLength, GetMagickSignature(), GetPolicyValue(), GetRandomKey(), GetStringInfoDatum(), HANDLER_RETURN_VALUE, MagickFalse, MagickPathExtent, NewSplayTree(), OpenDistributeCache(), random_info, ReadDistributeCacheMetacontent(), ReadDistributeCachePixels(), registry, RelinquishImageRegistry(), SOCKET_TYPE, ThrowFatalException, WriteDistributeCacheMetacontent(), and WriteDistributeCachePixels().
Referenced by DistributePixelCacheServer().
| MagickExport void DistributePixelCacheServer | ( | const int | port, | |
| ExceptionInfo * | exception | |||
| ) |
| static MagickOffsetType dpc_read | ( | int | file, | |
| const MagickSizeType | length, | |||
| unsigned char *magick_restrict | message | |||
| ) | [inline, static] |
References magick_unreferenced, MagickMin, and recv.
Referenced by DistributePixelCacheClient(), OpenDistributeCache(), OpenDistributePixelCache(), ReadDistributeCacheMetacontent(), ReadDistributeCachePixels(), ReadDistributePixelCacheMetacontent(), ReadDistributePixelCachePixels(), RelinquishDistributePixelCache(), WriteDistributeCacheMetacontent(), and WriteDistributeCachePixels().
| static MagickOffsetType dpc_send | ( | int | file, | |
| const MagickSizeType | length, | |||
| const unsigned char *magick_restrict | message | |||
| ) | [inline, static] |
References magick_unreferenced, MagickMin, MSG_NOSIGNAL, and send.
Referenced by DistributePixelCacheClient(), OpenDistributePixelCache(), ReadDistributeCacheMetacontent(), ReadDistributeCachePixels(), ReadDistributePixelCacheMetacontent(), ReadDistributePixelCachePixels(), RelinquishDistributePixelCache(), WriteDistributePixelCacheMetacontent(), and WriteDistributePixelCachePixels().
| MagickPrivate int GetDistributeCacheFile | ( | const DistributeCacheInfo * | server_info | ) |
References _DistributeCacheInfo::file, MagickCoreSignature, and _DistributeCacheInfo::signature.
| MagickPrivate const char* GetDistributeCacheHostname | ( | const DistributeCacheInfo * | server_info | ) |
References _DistributeCacheInfo::hostname, MagickCoreSignature, and _DistributeCacheInfo::signature.
Referenced by OpenPixelCache().
| MagickPrivate int GetDistributeCachePort | ( | const DistributeCacheInfo * | server_info | ) |
References MagickCoreSignature, _DistributeCacheInfo::port, and _DistributeCacheInfo::signature.
Referenced by OpenPixelCache().
| static char* GetHostname | ( | int * | port, | |
| ExceptionInfo * | exception | |||
| ) | [static] |
References AcquireString(), DestroyString(), DPCHostname, DPCPort, GetImageRegistry(), RelinquishMagickMemory(), StringRegistryType, StringToArgv(), StringToLong(), and SubstituteString().
Referenced by AcquireDistributeCacheInfo().
| static MagickBooleanType OpenDistributeCache | ( | SplayTreeInfo * | registry, | |
| int | file, | |||
| const size_t | session_key, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
References AcquireImage(), AddValueToSplayTree(), _Image::alpha_trait, _Image::channel_map, _Image::channels, _Image::colorspace, _Image::columns, dpc_read(), MagickFalse, MagickPathExtent, MaxPixelChannels, _Image::metacontent_extent, _Image::number_channels, _Image::rows, _Image::storage_class, and SyncImagePixelCache().
Referenced by DistributePixelCacheClient().
| MagickPrivate MagickBooleanType OpenDistributePixelCache | ( | DistributeCacheInfo * | server_info, | |
| Image * | image | |||
| ) |
References _Image::alpha_trait, _Image::channel_map, _Image::channels, _Image::colorspace, _Image::columns, dpc_read(), dpc_send(), _DistributeCacheInfo::file, MagickCoreSignature, MagickFalse, MagickPathExtent, MagickTrue, MaxPixelChannels, _Image::metacontent_extent, _Image::number_channels, _Image::rows, _DistributeCacheInfo::session_key, _Image::signature, _DistributeCacheInfo::signature, and _Image::storage_class.
| static MagickBooleanType ReadDistributeCacheMetacontent | ( | SplayTreeInfo * | registry, | |
| int | file, | |||
| const size_t | session_key, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
| static MagickBooleanType ReadDistributeCachePixels | ( | SplayTreeInfo * | registry, | |
| int | file, | |||
| const size_t | session_key, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
References dpc_read(), dpc_send(), GetValueFromSplayTree(), GetVirtualPixels(), _RectangleInfo::height, MagickFalse, MagickPathExtent, MagickTrue, _RectangleInfo::width, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by DistributePixelCacheClient().
| MagickPrivate MagickOffsetType ReadDistributePixelCacheMetacontent | ( | DistributeCacheInfo * | server_info, | |
| const RectangleInfo * | region, | |||
| const MagickSizeType | length, | |||
| unsigned char * | metacontent | |||
| ) |
| MagickPrivate MagickOffsetType ReadDistributePixelCachePixels | ( | DistributeCacheInfo * | server_info, | |
| const RectangleInfo * | region, | |||
| const MagickSizeType | length, | |||
| unsigned char *magick_restrict | pixels | |||
| ) |
| MagickPrivate MagickBooleanType RelinquishDistributePixelCache | ( | DistributeCacheInfo * | server_info | ) |
| static void* RelinquishImageRegistry | ( | void * | image | ) | [static] |
References DestroyImageList().
Referenced by DistributePixelCacheClient().
| static MagickBooleanType WriteDistributeCacheMetacontent | ( | SplayTreeInfo * | registry, | |
| int | file, | |||
| const size_t | session_key, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
| static MagickBooleanType WriteDistributeCachePixels | ( | SplayTreeInfo * | registry, | |
| int | file, | |||
| const size_t | session_key, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
| MagickPrivate MagickOffsetType WriteDistributePixelCacheMetacontent | ( | DistributeCacheInfo * | server_info, | |
| const RectangleInfo * | region, | |||
| const MagickSizeType | length, | |||
| const unsigned char * | metacontent | |||
| ) |
| MagickPrivate MagickOffsetType WriteDistributePixelCachePixels | ( | DistributeCacheInfo * | server_info, | |
| const RectangleInfo * | region, | |||
| const MagickSizeType | length, | |||
| const unsigned char *magick_restrict | pixels | |||
| ) |
1.6.1