TTCPStream Class

From RemObjects Wiki
Jump to: navigation, search

This is a Library topic for RemObjects SDK for Delphi
This page is generated from external data, please do not update

InterfacesClassesAliasesImplements

Contents

Overview

The TTCPStream class is an abstract class for communicating through the TCP protocol. The TZeroConfHubClient uses it as an opaque communication channel (via the abstract method TZeroConfHubClient.CreateTCPClient). Currently, the TROHubSynapseTCPClient class realizes a TTCPStream to provide a TZeroConfHubSynapseClient with a communication channel. You can supply your own implementation, if, for example, you need to use a different communication library.


Location

uROZeroConfStreamWorker.pas TTCPStream | Descendants


Properties

Connected

Reports if there is an active connection.



property Connected: Boolean read


Instance Methods

constructor Create   virtual



constructor Create


destructor Destroy   override



destructor Destroy


Connect   virtual abstract

Abstract method to establish a connection to AHost on port aPort.


procedure Connect(AHost: string; aPort: Integer)


Parameters:

  • AHost: Destination IP
  • aPort: Destination port


GetConnected   protected virtual abstract

Abstract method that reports all active connections.


function GetConnected: Boolean


Read   virtual abstract

Abstract method to read Count bytes into the Buffer and return the number of bytes actually read.


function Read(Buffer: Pointer; Count: Longint): Longint


Parameters:

  • Buffer: Points to the destination buffer
  • Count: Specifies the number of bytes of data to attempt to read


ReadExact

Uses Read to read exactly Count bytes into the Buffer and return the number of bytes actually read. It may return a value less than Count if Connected becomes False while reading.


function ReadExact(Buffer: Pointer; Count: Longint): Longint


Parameters:

  • Buffer: Points to the destination buffer
  • Count: Specifies the number of bytes of data to attempt to read


Stop   virtual abstract

Abstract method to cancel all active data transferring.


procedure Stop


TryConnect   virtual abstract

Abstract method to establish a connection to AHost on port aPort in a non-blocking manner.


function TryConnect(AHost: string; aPort: Integer): Boolean


Parameters:

  • AHost: Destination IP
  • aPort: Destination port


Write   virtual abstract

Abstract method to write Count bytes from the Buffer and return the number of bytes actually written.


function Write(const Buffer: ; Count: Longint): Longint


Parameters:

  • Buffer: Points to the source buffer
  • Count: Specifies the number of bytes of data to attempt to write


Descendants


See Also


Product: RemObjects SDK
Available Editions: RemObjects SDK for .NET, Xcode, Delphi, Java and JavaScript

GlossaryArticlesLibrarySamples

Personal tools
Namespaces

Variants
Actions
Navigation
products
platforms
special
Toolbox