MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
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

◆ CLOSE_SOCKET

#define CLOSE_SOCKET (   socket)

◆ DPCHostname

#define DPCHostname   "127.0.0.1"

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

Referenced by GetHostname().

◆ DPCPendingConnections

#define DPCPendingConnections   10

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

Referenced by DistributePixelCacheServer().

◆ DPCPort

#define DPCPort   6668

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

Referenced by GetHostname().

◆ DPCSessionKeyLength

#define DPCSessionKeyLength   8

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

Referenced by DistributePixelCacheClient().

◆ HANDLER_RETURN_TYPE

#define HANDLER_RETURN_TYPE   void *

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

◆ HANDLER_RETURN_VALUE

#define HANDLER_RETURN_VALUE   (void *) NULL

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

Referenced by DistributePixelCacheClient().

◆ MSG_NOSIGNAL

#define MSG_NOSIGNAL   0

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

Referenced by dpc_send().

◆ recv

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

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

Referenced by ConnectPixelCacheServer(), and dpc_read().

◆ send

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

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

Referenced by dpc_send().

◆ SOCKET_TYPE

#define SOCKET_TYPE   int

Function Documentation

◆ AcquireDistributeCacheInfo()

◆ ConnectPixelCacheServer()

static int ConnectPixelCacheServer ( const char *  hostname,
const int  port,
size_t *  session_key,
ExceptionInfo exception 
)
static

◆ DestroyDistributeCache()

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().

◆ DestroyDistributeCacheInfo()

◆ DistributePixelCacheClient()

◆ DistributePixelCacheServer()

◆ dpc_read()

◆ dpc_send()

◆ GetDistributeCacheFile()

MagickPrivate int GetDistributeCacheFile ( const DistributeCacheInfo server_info)

◆ GetDistributeCacheHostname()

MagickPrivate const char* GetDistributeCacheHostname ( const DistributeCacheInfo server_info)

◆ GetDistributeCachePort()

MagickPrivate int GetDistributeCachePort ( const DistributeCacheInfo server_info)

◆ GetHostname()

static char* GetHostname ( int *  port,
ExceptionInfo exception 
)
static

◆ OpenDistributeCache()

◆ OpenDistributePixelCache()

◆ ReadDistributeCacheMetacontent()

static MagickBooleanType ReadDistributeCacheMetacontent ( SplayTreeInfo registry,
int  file,
const size_t  session_key,
ExceptionInfo exception 
)
static

◆ ReadDistributeCachePixels()

static MagickBooleanType ReadDistributeCachePixels ( SplayTreeInfo registry,
int  file,
const size_t  session_key,
ExceptionInfo exception 
)
static

◆ ReadDistributePixelCacheMetacontent()

◆ ReadDistributePixelCachePixels()

◆ RelinquishDistributePixelCache()

◆ RelinquishImageRegistry()

static void* RelinquishImageRegistry ( void *  image)
static

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

References DestroyImageList().

Referenced by DistributePixelCacheClient().

◆ WriteDistributeCacheMetacontent()

static MagickBooleanType WriteDistributeCacheMetacontent ( SplayTreeInfo registry,
int  file,
const size_t  session_key,
ExceptionInfo exception 
)
static

◆ WriteDistributeCachePixels()

static MagickBooleanType WriteDistributeCachePixels ( SplayTreeInfo registry,
int  file,
const size_t  session_key,
ExceptionInfo exception 
)
static

◆ WriteDistributePixelCacheMetacontent()

◆ WriteDistributePixelCachePixels()