mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 23:07:13 +02:00
starting to add new Socket interface
This commit is contained in:
23
slsSupportLib/include/DataSocket.h
Normal file
23
slsSupportLib/include/DataSocket.h
Normal file
@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
namespace sls {
|
||||
|
||||
class DataSocket {
|
||||
public:
|
||||
DataSocket(int socketId);
|
||||
|
||||
int getSocketId() const{
|
||||
return socketId_;
|
||||
}
|
||||
size_t sendData(char *buffer, size_t size);
|
||||
size_t receiveData(char * buffer, size_t size);
|
||||
|
||||
void close();
|
||||
|
||||
private:
|
||||
int socketId_ = -1;
|
||||
};
|
||||
|
||||
}; // namespace sls
|
Reference in New Issue
Block a user