Table of Contents

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

int

IsConnected

Is the pipe client currently connected?

bool IsConnected { get; }

Property Value

bool

Logger

The logger for the Pipe client to use

ILogger Logger { get; set; }

Property Value

ILogger

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 int

If -1 is passed, the pipe will find the first available pipe, otherwise it connects to the pipe that was supplied

Returns

bool

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 PipeFrame

The frame that has been read. Will be

default(PipeFrame)
if it fails to read

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 PipeFrame

The frame to be written

Returns

bool