📄 flitvecio.h
字号:
/** @file flitvecio.h defines the methods to send and receive messages between daemons */#ifndef FLITVECIO_H#define FLITVECIO_H#include "flitvec.h"/** send a flitvec in fd descriptor. * @param fd : the file descriptor * @param message : the flitvec to send * @return * - -1 : broken connection * - 1 : message sent * - 0 : message being send */int sendvec(int fd, flitvec * message);/** receive a flitvec from fd. * @param fd : the file descritor * @param message : the flitvec received * @return * - -2 : broken connection * - -1 : message received * - 0 : message being receive */int receivevec(int fd, flitvec * message);/** send asynchronously a part of message (flit). * @param fd : the file descritor to use * @param aflit : the flit to send * @return * - -2 broken connection * - -1 flit sent * - 0 blocked socket * - num : num bytes sent * DO NOT CALL oncomplete */int asyncflitsend(int fd, int pos, flit * aflit);/** send synchronously a part of message (flit). * @param fd : the file descritor to use * @param param: the parameter to pass to oncomplete functions * @param aflit : the flit to send * @return * - -2 : broken connection * - -1 : flit sent */int syncflitsend(int fd, void *param, flit * aflit);/** asynchronously receive a flit from fd. * @param fd : the file descritor to read from * @param aflit : the flit received * @return * - -2 broken connection * - -1 flit received * - 0 blocked socket * - num : num bytes received * DO NOT CALL oncomplete */int asyncflitreceive(int fd, int pos, flit * aflit);/** synchronously receive a flit from fd. * @param fd : the file descritor to read from * @param param: the parameter to pass to oncomplete functions * @param aflit : the flit received * @return * - -2 : broken connection * - -1 : flit received */int syncflitreceive(int fd, void *param, flit * aflit);#endif /* FLITVECIO_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -