16 #ifndef MBS_ServerTransport
17 #define MBS_ServerTransport
19 #ifndef DABC_Transport
23 #ifndef DABC_SocketThread
31 #ifndef DABC_eventsapi
35 #ifndef MBS_MbsTypeDefs
134 int kind,
int portnum,
Reference on memory from memory pool.
Represents command with its arguments.
Interface for implementing any kind of data output.
Reference on the dabc::Port class
Socket addon for handling I/O events.
Socket addon for handling connection requests on server side.
Base class for transport implementations.
Uniform Resource Locator interpreter.
Generic addon for dabc::Worker.
Addon for output of server-side different kinds of MBS server
ServerOutputAddon(int fd, int kind, dabc::EventsIteratorRef &iter, uint32_t subid)
virtual unsigned Write_Buffer(dabc::Buffer &buf)
Start writing of buffer to output.
virtual void OnRecvCompleted()
Method called when receive operation is completed.
mbs::TransportInfo fServInfo
virtual double ProcessTimeout(double last_diff)
virtual void OnSocketError(int err, const std::string &info)
Generic error handler.
virtual dabc::WorkerAddon * Write_GetAddon()
Returns addon, provided by data output If specified, supposed that I/O object is double-derived from ...
virtual unsigned Write_Check()
Check if output can be done.
void SetServerKind(int kind)
virtual void OnThreadAssigned()
void FillServInfo(int32_t maxbytes, bool isnewformat)
virtual double Write_Timeout()
Timeout in seconds for write operation.
void MakeCallback(unsigned sz)
mbs::SubeventHeader fSubHdr
virtual void OnSendCompleted()
Method called when send operation is completed.
virtual ~ServerOutputAddon()
dabc::EventsIteratorRef fIter
mbs::BufferHeader fHeader
Server transport for different kinds of MBS server.
int fKind
kind: stream or transport
uint32_t fSubevId
subevent id when non-MBS events are used
int fPortNum
used port number (only for info)
ServerTransport(dabc::Command cmd, const dabc::PortRef &outport, int kind, int portnum, dabc::SocketServerAddon *connaddon, const dabc::Url &url)
int fClientsLimit
maximum number of simultaneous clients
bool fBlocking
if true, server will block buffers until it can be delivered
int fDoingClose
0 - normal, 1 - saw EOF, 2 - all clients are gone
bool fDeliverAll
if true, server will try deliver all events when clients are there (default for transport)
virtual bool ProcessRecv(unsigned)
Method called by framework when at least one buffer available in input port.
virtual bool StopTransport()
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
int fSlaveQueueLength
queue length, used for slaves connections
void ProcessConnectionActivated(const std::string &name, bool on)
Method called when module on other side is started.
virtual bool StartTransport()
Methods activated by Port, when transport starts/stops.
std::string fIterKind
iterator kind when non-mbs events should be delivered to clients
virtual ~ServerTransport()
virtual bool ProcessSend(unsigned)
Method called by framework when at least one buffer can be send to output port.
Support for MBS - standard GSI DAQ.
MBS server info structure.