mirror of
https://github.com/wassname/ray.git
synced 2026-08-02 13:01:01 +08:00
* Run clang-format and add pre-commit hook for it. * Modify .travis.yml to check * Try to fix problems with .travis.yml * Try to fix .travis.yml yet again * Update .clang-format to Philipp's preferences * Don't allow lint to fail in Travis * Remove git-hooks directory * Improve clang-format failure output * Fix clang-format error * Report which commit clang-format is comparing against, and add whitespace error * Handle non-PR Travis in clang-format, and add another error * Check $TRAVIS_PULL_REQUEST correctly and add another error * Fix syntax error in check-git-clang-format-output.sh * Add whitespace error * Remove extra whitespace, add clang-format to README
34 lines
918 B
C
34 lines
918 B
C
#ifndef PLASMA_MANAGER_H
|
|
#define PLASMA_MANAGER_H
|
|
|
|
#include <poll.h>
|
|
#include "utarray.h"
|
|
|
|
/* The buffer size in bytes. Data will get transfered in multiples of this */
|
|
#define BUFSIZE 4096
|
|
|
|
enum connection_type { CONNECTION_REDIS, CONNECTION_LISTENER, CONNECTION_DATA };
|
|
|
|
enum data_connection_type {
|
|
/* Connection to send commands and metadata to the manager. */
|
|
DATA_CONNECTION_HEADER,
|
|
/* Connection to send data to another manager. */
|
|
DATA_CONNECTION_WRITE,
|
|
/* Connection to receive data from another manager. */
|
|
DATA_CONNECTION_READ
|
|
};
|
|
|
|
typedef struct {
|
|
/* Of type data_connection_type. */
|
|
int type;
|
|
/* Local socket of the plasma store that is accessed for reading or writing
|
|
* data for this connection. */
|
|
int store_conn;
|
|
/* Buffer this connection is reading from or writing to. */
|
|
plasma_buffer buf;
|
|
/* Current position in the buffer. */
|
|
int64_t cursor;
|
|
} data_connection;
|
|
|
|
#endif
|