bergamaschi e2f9d69677 SlsDetector client library and servers. First import.
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@1 951219d9-93cf-4727-9268-0efd64621fa3
2009-10-09 14:10:09 +00:00

33 lines
797 B
C
Executable File

#ifndef COMMUNICATION_FUNCS_H
#define COMMUNICATION_FUNCS_H
#define SEND_REC_MAX_SIZE 4096
#define DEFAULT_PORTNO 1952
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <unistd.h>
#include "sls_detector_defs.h"
int bindSocket(unsigned short int port_number);
int acceptConnection();
void closeConnection();
void exitServer();
int sendDataOnly(void* buf,int length);
int receiveDataOnly(void* buf,int length);
int getServerError();
int sendChannel(sls_detector_channel *myChan);
int sendChip(sls_detector_chip *myChip);
int sendModule(sls_detector_module *myMod);
int receiveChannel(sls_detector_channel *myChan);
int receiveChip(sls_detector_chip* myChip);
int receiveModule(sls_detector_module* myMod);
#endif