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 SourceConnectAsync(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 |
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 SourceConnected
Event triggered upon successful connection
Declaration
event EventHandler Connected
Event Type
Type | Description |
---|---|
System.EventHandler |
DataReceived
Event triggered when incoming data is receieved over the connection
Declaration
event EventHandler<DataReceivedEventArgs> DataReceived
Event Type
Type | Description |
---|---|
System.EventHandler<DataReceivedEventArgs> |
Disconnected
Event triggered when the connection is terminated
Declaration
event EventHandler Disconnected
Event Type
Type | Description |
---|---|
System.EventHandler |