Class Client
- Namespace
- QuickLink
- Assembly
- QuickLink.dll
Represents a client that connects to a server using TCP/IP.
public class Client : IClient, IDisposable
- Inheritance
-
Client
- Implements
- Inherited Members
Fields
Connected
Event that is raised when the client successfully connects to the server.
public EventPublisher Connected
Field Value
ConnectionState
Current state of the client's TCP connection.
public ConnectionState ConnectionState
Field Value
Disconnected
Event that is raised when the client disconnects from the server.
public EventPublisher Disconnected
Field Value
Properties
MessageReceived
Event that is raised when a message is received from the server.
public MessagePublisher MessageReceived { get; }
Property Value
Methods
Connect(string, int)
Connects the client to the specified host and port.
public Task Connect(string host, int port)
Parameters
Returns
Exceptions
Dispose()
Releases the resources used by the Client object.
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the Client object and optionally releases the managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
~Client()
Finalizes an instance of the Client class.
protected ~Client()
SendToServer(MessageWriter)
Sends a message to the server.
public void SendToServer(MessageWriter message)
Parameters
message
MessageWriterThe message to send.