MagickCore  7.0.3
distribute-cache.c File Reference
Include dependency graph for distribute-cache.c:

Go to the source code of this file.

Macros

#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 DistributeCacheInfoAcquireDistributeCacheInfo (ExceptionInfo *exception)
 
MagickPrivate DistributeCacheInfoDestroyDistributeCacheInfo (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)
 

Macro Definition Documentation

#define CLOSE_SOCKET (   socket)
#define DPCHostname   "127.0.0.1"

Definition at line 117 of file distribute-cache.c.

Referenced by GetHostname().

#define DPCPendingConnections   10

Definition at line 118 of file distribute-cache.c.

Referenced by DistributePixelCacheServer().

#define DPCPort   6668

Definition at line 119 of file distribute-cache.c.

Referenced by GetHostname().

#define DPCSessionKeyLength   8

Definition at line 120 of file distribute-cache.c.

Referenced by DistributePixelCacheClient().

#define HANDLER_RETURN_TYPE   void *

Definition at line 105 of file distribute-cache.c.

#define HANDLER_RETURN_VALUE   (void *) NULL

Definition at line 106 of file distribute-cache.c.

Referenced by DistributePixelCacheClient().

#define MSG_NOSIGNAL   0

Definition at line 122 of file distribute-cache.c.

Referenced by dpc_send().

#define recv (   file,
  buffer,
  length,
  flags 
)    0

Definition at line 111 of file distribute-cache.c.

Referenced by ConnectPixelCacheServer(), and dpc_read().

#define send (   file,
  buffer,
  length,
  flags 
)    0

Definition at line 110 of file distribute-cache.c.

Referenced by dpc_send().

#define SOCKET_TYPE   int

Function Documentation

static int ConnectPixelCacheServer ( const char *  hostname,
const int  port,
size_t *  session_key,
ExceptionInfo exception 
)
static
static MagickBooleanType DestroyDistributeCache ( SplayTreeInfo registry,
const size_t  session_key 
)
static

Definition at line 425 of file distribute-cache.c.

References DeleteNodeFromSplayTree().

Referenced by DistributePixelCacheClient().

MagickPrivate int GetDistributeCacheFile ( const DistributeCacheInfo server_info)
MagickPrivate const char* GetDistributeCacheHostname ( const DistributeCacheInfo server_info)
MagickPrivate int GetDistributeCachePort ( const DistributeCacheInfo server_info)
static char* GetHostname ( int *  port,
ExceptionInfo exception 
)
static
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
static void* RelinquishImageRegistry ( void *  image)
static

Definition at line 647 of file distribute-cache.c.

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