Show / Hide Table of Contents

Class IrcClient

The NetIRC IRC client

Inheritance
System.Object
IrcClient
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GravyIrc
Assembly: GravyIrc.dll
Syntax
public class IrcClient : IDisposable

Constructors

| Improve this Doc View Source

IrcClient(User, IConnection)

Initializes a new instance of the IRC client with a User and an IConnection implementation

Declaration
public IrcClient(User user, IConnection connection)
Parameters
Type Name Description
User user

User who wishes to connect to the server

IConnection connection

IConnection implementation

| Improve this Doc View Source

IrcClient(User, String, IConnection)

Declaration
public IrcClient(User user, string password, IConnection connection)
Parameters
Type Name Description
User user
System.String password
IConnection connection

Properties

| Improve this Doc View Source

Channels

An observable collection representing the channels we joined

Declaration
public ChannelCollection Channels { get; }
Property Value
Type Description
ChannelCollection
| Improve this Doc View Source

EventHub

Provides you a way to handle various IRC events like OnPing and OnPrivMsg

Declaration
public EventHub EventHub { get; }
Property Value
Type Description
EventHub
| Improve this Doc View Source

Peers

An observable collection representing all peers (users) the client knows about It can be channel users, or query users (private chat)

Declaration
public UserCollection Peers { get; }
Property Value
Type Description
UserCollection
| Improve this Doc View Source

Queries

An observable collection representing all queries (private chat)

Declaration
public QueryCollection Queries { get; }
Property Value
Type Description
QueryCollection
| Improve this Doc View Source

User

Represents the user used to connect to the server

Declaration
public User User { get; }
Property Value
Type Description
User

Methods

| Improve this Doc View Source

ConnectAsync(String, Int32)

Connects to the specified IRC server using the specified port number

Declaration
public Task ConnectAsync(string host, int port = 6667)
Parameters
Type Name Description
System.String host

IRC server address

System.Int32 port

Port number

Returns
Type Description
System.Threading.Tasks.Task

The task object representing the asynchronous operation

| Improve this Doc View Source

Dispose()

Disposes the connection

Declaration
public void Dispose()
| Improve this Doc View Source

SendAsync(IClientMessage)

Allows you to send a strong typed client message to the IRC server

Declaration
public Task SendAsync(IClientMessage message)
Parameters
Type Name Description
IClientMessage message

An implementation of IClientMessage. Check NetIRC.Messages namespace

Returns
Type Description
System.Threading.Tasks.Task

The task object representing the asynchronous operation

| Improve this Doc View Source

SendRaw(String)

Allows you to send raw data the the IRC server

Declaration
public Task SendRaw(string rawData)
Parameters
Type Name Description
System.String rawData

The raw data to be sent

Returns
Type Description
System.Threading.Tasks.Task

The task object representing the asynchronous operation

Events

| Improve this Doc View Source

OnDisconnect

Indicates that the connection to the IRC server has been terminated or lost

Declaration
public event EventHandler OnDisconnect
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

OnIrcMessageParsed

Indicates that we have parsed the message and gives you a strong typed representation of it You get the prefix, command, parameters and some other goodies

Declaration
public event ParsedIrcMessageHandler OnIrcMessageParsed
Event Type
Type Description
ParsedIrcMessageHandler
| Improve this Doc View Source

OnRawDataReceived

Indicates that we received raw data from the server and gives you access to the data

Declaration
public event IrcRawDataHandler OnRawDataReceived
Event Type
Type Description
IrcRawDataHandler

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX