8#include "Arp/System/Commons/Net/PollMode.hpp"
9#include "Arp/System/Commons/Net/SelectMode.hpp"
10#include "Arp/System/Commons/Net/ShutdownMode.hpp"
11#include "Arp/System/Commons/Ipc/IpcSocketError.hpp"
14namespace Arp {
namespace System {
namespace Ve
19namespace Arp {
namespace System {
namespace Commons {
namespace Ipc
39 typedef std::shared_ptr<IpcSocket>
Ptr;
51 using ISocketService = Arp::System::Ve::ISocketService;
182 ISocketService *pSocketService;
Socket for interprocess communication between processes on the same controller.
Definition: IpcSocket.hpp:34
int Poll(PollMode mode, Milliseconds timeout, IpcSocketError &error)
Checks if an i/o operation can be processed without blocking.
~IpcSocket(void)
Closes the socket and releases all ressources.
int Receive(void *pBuffer, size_t length, IpcSocketError &error)
Reads data from connected socket.
IpcSocket & operator=(const IpcSocket &arg)=delete
Assignment operator is deleted.
IpcSocket(bool blocking=true)
Constructs a new socket for interprocess communication.
bool Select(SelectMode mode, Microseconds timeout, IpcSocketError &error)
Checks if an i/o operation can be performed without blocking the calling thread.
std::shared_ptr< IpcSocket > Ptr
Contextual definition of pointer type.
Definition: IpcSocket.hpp:39
Ptr Accept(IpcSocketError &error)
Accepts a pending connection request.
IpcSocketError Listen(size_t backlog)
Marks this socket as a passive socket that accepts incoming connection requests.
IpcSocketError Connect(const Arp::String &path)
Tries to connect with a remote socket.
IpcSocketError Shutdown(void)
Shuts down a connection.
IpcSocketError Bind(const Arp::String &path)
Assigns an address to this socket so that other process can connect with it.
int Send(const void *pBuffer, size_t length, IpcSocketError &error)
Transmit data over the socket that is in a connected state.
IpcSocket(const IpcSocket &arg)=delete
Copy constructor is deleted.
IpcSocketError Shutdown(ShutdownMode mode)
Shuts down a connection.
IpcSocketError Close(void)
Closes the socket. This ends all communication on the socket.
IpcSocket(IpcSocket &&arg)=default
Move constructor.
std::chrono::milliseconds Milliseconds
The Arp Milliseconds unit class.
Definition: TypeSystem.h:52
std::chrono::microseconds Microseconds
The Arp Microseconds unit class.
Definition: TypeSystem.h:49
@ System
System components used by the System, Device, Plc or Io domains.
IpcSocketError
Enumeration of possible error return codes from IpcSocket operations.
Definition: IpcSocketError.hpp:14
PollMode
This enum is used to specifiy the poll mode of the <cref name="Socket::Poll" > operation.
Definition: PollMode.hpp:15
SelectMode
Modes for Select call to check different data channels.
Definition: SelectMode.hpp:14
ShutdownMode
This enum is used to specifiy the shutdown mode of the <cref name="Socket::Shutdown(ShutdownMode)" > ...
Definition: ShutdownMode.hpp:15
Root namespace for the PLCnext API