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"
12#include "Arp/System/Commons/Ipc/PeerCredentials.hpp"
15namespace Arp {
namespace System {
namespace Ve
20namespace Arp {
namespace System {
namespace Commons {
namespace Ipc
40 typedef std::shared_ptr<IpcSocket>
Ptr;
52 using ISocketService = Arp::System::Ve::ISocketService;
83 ISocketService *pSocketService;
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Socket for interprocess communication between processes on the same controller.
Definition: IpcSocket.hpp:35
int Poll(PollMode mode, Milliseconds timeout, IpcSocketError &error)
Checks if an i/o operation can be processed without blocking.
Definition: IpcSocket.cpp:134
~IpcSocket(void)
Closes the socket and releases all ressources.
Definition: IpcSocket.cpp:28
int Receive(void *pBuffer, size_t length, IpcSocketError &error)
Reads data from connected socket.
Definition: IpcSocket.cpp:256
IpcSocket & operator=(const IpcSocket &arg)=delete
Assignment operator is deleted.
IpcSocket(bool blocking=true)
Constructs a new socket for interprocess communication.
Definition: IpcSocket.cpp:15
bool Select(SelectMode mode, Microseconds timeout, IpcSocketError &error)
Checks if an i/o operation can be performed without blocking the calling thread.
Definition: IpcSocket.cpp:105
std::shared_ptr< IpcSocket > Ptr
Contextual definition of pointer type.
Definition: IpcSocket.hpp:40
IpcSocketError Listen(size_t backlog)
Marks this socket as a passive socket that accepts incoming connection requests.
Definition: IpcSocket.cpp:67
Ptr Accept(IpcSocketError &error)
Accepts a pending connection request.
Definition: IpcSocket.cpp:165
PeerCredentials GetPeerCredentials(IpcSocketError &error)
Reads peer credentials from connected socket.
Definition: IpcSocket.cpp:277
IpcSocketError Connect(const Arp::String &path)
Tries to connect with a remote socket.
Definition: IpcSocket.cpp:86
IpcSocketError Shutdown(void)
Shuts down a connection.
Definition: IpcSocket.cpp:191
IpcSocketError Bind(const Arp::String &path)
Assigns an address to this socket so that other process can connect with it.
Definition: IpcSocket.cpp:45
int Send(const void *pBuffer, size_t length, IpcSocketError &error)
Transmit data over the socket that is in a connected state.
Definition: IpcSocket.cpp:233
IpcSocket(const IpcSocket &arg)=delete
Copy constructor is deleted.
IpcSocketError Close(void)
Closes the socket. This ends all communication on the socket.
Definition: IpcSocket.cpp:215
IpcSocket(IpcSocket &&arg)=default
Move constructor.
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
This struct holds credentials of a UnixDomainSocket Peer
Definition: PeerCredentials.hpp:15