Class TcpClientConnection
Represents a TCP connection to an IRC server
Inheritance
System.Object
TcpClientConnection
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.Connection
Assembly: GravyIrc.dll
Syntax
public class TcpClientConnection : IConnection, IDisposable
Methods
| Improve this Doc View SourceConnectAsync(String, Int32)
Connects the client to an IRC server using the specified address and port number as an asynchronous operation
Declaration
public Task ConnectAsync(string address, int port)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The address of the IRC server |
System.Int32 | port | The port number |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous operation |
Dispose()
Disposes streams and the TcpClient
Declaration
public void Dispose()
SendAsync(String)
Sends raw data to the IRC server
Declaration
public Task SendAsync(string data)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | Data to be sent |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous operation |
Events
| Improve this Doc View SourceConnected
Indicates that the TCP connection is completed
Declaration
public event EventHandler Connected
Event Type
Type | Description |
---|---|
System.EventHandler |
DataReceived
Indicates that data has been received through the connection
Declaration
public event EventHandler<DataReceivedEventArgs> DataReceived
Event Type
Type | Description |
---|---|
System.EventHandler<DataReceivedEventArgs> |
Disconnected
Indicates that the TCP connection was closed
Declaration
public event EventHandler Disconnected
Event Type
Type | Description |
---|---|
System.EventHandler |
Implements
System.IDisposable