Interface INamedPipeClient
- Namespace
- DiscordRPC.IO
- Assembly
- DiscordRPC.dll
Pipe Client used to communicate with Discord.
public interface INamedPipeClient : IDisposable
- Inherited Members
Properties
ConnectedPipe
The pipe the client is currently connected too
[Obsolete("The connected pipe is not neccessary information.")]
int ConnectedPipe { get; }
Property Value
IsConnected
Is the pipe client currently connected?
bool IsConnected { get; }
Property Value
Logger
The logger for the Pipe client to use
ILogger Logger { get; set; }
Property Value
Methods
Close()
Closes the connection
void Close()
Connect(int)
Attempts to connect to the pipe. If 0-9 is passed to pipe, it should try to only connect to the specified pipe. If -1 is passed, the pipe will find the first available pipe.
bool Connect(int pipe)
Parameters
pipe
intIf -1 is passed, the pipe will find the first available pipe, otherwise it connects to the pipe that was supplied
Returns
ReadFrame(out PipeFrame)
Reads a frame if there is one available. Returns false if there is none. This should be non blocking (aka use a Peek first).
bool ReadFrame(out PipeFrame frame)
Parameters
frame
PipeFrameThe frame that has been read. Will be
if it fails to readdefault(PipeFrame)
Returns
- bool
Returns true if a frame has been read, otherwise false.
WriteFrame(PipeFrame)
Writes the frame to the pipe. Returns false if any errors occur.
bool WriteFrame(PipeFrame frame)
Parameters
frame
PipeFrameThe frame to be written