Show / Hide Table of Contents

Interface IConnection

Represents an interface for a connection

Inherited Members
System.IDisposable.Dispose()
Namespace: GravyIrc.Connection
Assembly: GravyIrc.dll
Syntax
public interface IConnection : IDisposable

Methods

| Improve this Doc View Source

ConnectAsync(String, Int32)

Open a TCP connection

Declaration
Task ConnectAsync(string address, int port)
Parameters
Type Name Description
System.String address

Address to connect to

System.Int32 port

TCP port to open connection on

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

SendAsync(String)

Send a message over an open connection

Declaration
Task SendAsync(string data)
Parameters
Type Name Description
System.String data

Raw string data to send

Returns
Type Description
System.Threading.Tasks.Task

Events

| Improve this Doc View Source

Connected

Event triggered upon successful connection

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

DataReceived

Event triggered when incoming data is receieved over the connection

Declaration
event EventHandler<DataReceivedEventArgs> DataReceived
Event Type
Type Description
System.EventHandler<DataReceivedEventArgs>
| Improve this Doc View Source

Disconnected

Event triggered when the connection is terminated

Declaration
event EventHandler Disconnected
Event Type
Type Description
System.EventHandler
  • Improve this Doc
  • View Source
Back to top Generated by DocFX