-
Notifications
You must be signed in to change notification settings - Fork 0
501f2cde 1d49 c096 44c2 528e3a568622
Arthur Frederico Neves edited this page Jul 19, 2016
·
6 revisions
TCPPublisher ClassPublisher that uses the TCP protocol for sending and receiving packs
System.Object
NETLIB.Publisher
NETLIB.TCP.TCPPublisher
Namespace: NETLIB.TCP
Assembly: NETLIB (in NETLIB.dll) Version: 1.0.0.0 (1.0.0.0)
C#
public class TCPPublisher : Publisher
VB
Public Class TCPPublisher
Inherits Publisher
C++
public ref class TCPPublisher : public Publisher
F#
type TCPPublisher =
class
inherit Publisher
end
The TCPPublisher type exposes the following members.
Name | Description | |
---|---|---|
![]() |
TCPPublisher(Stream) | Initializes the publisher with a existing client TCP stream. |
![]() |
TCPPublisher(String, Int32) | Initializes the publisher and creates a TCP connection using the IP and port. |
Name | Description | |
---|---|---|
![]() |
IncomingPackEvent | Event signaling that a packet arrived. (Inherited from Publisher.) |
![]() |
InputOutput | TCP client stream. |
![]() |
IsAlive | Boolean indicating whether the stream is still alive and able to receive new packages. (Inherited from Publisher.) |
![]() |
IsEnabled | Boolean indicating whether the publisher is currently active, publishing packages. (Inherited from Publisher.) |
![]() |
PackQueue | Gets the pack queue (Inherited from Publisher.) |
Name | Description | |
---|---|---|
![]() |
CloseConnection | Stop listening packets, closes the stream and reset the properties of the publisher (Overrides Publisher.CloseConnection().) |
![]() |
Dispose | Closes the connection, and resets the states of the publisher. (Inherited from Publisher.) |
![]() |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() |
Finalize | Release resources in the death of the object if the Dispose() method was not used properly. (Inherited from Publisher.) |
![]() |
GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
OnConnectionClosedCall | Calls ConnectionClosedEvent (Inherited from Publisher.) |
![]() |
Publish | Method responsible for receiving packets of stream and puts them in the packet queue and signal the incoming pack event. (Overrides Publisher.Publish().) |
![]() |
SendPack(Byte[], IPEndPoint) | Sends the packet through the TCP stream. (Overrides Publisher.SendPack(Byte[], IPEndPoint).) |
![]() |
SendPack(BasePack, IPEndPoint) | Sends the packet through the TCP stream. (Overrides Publisher.SendPack(BasePack, IPEndPoint).) |
![]() |
Start | Starts the packages listening/receive thread. (Inherited from Publisher.) |
![]() |
Stop | Stops the packages listening/receive thread. (Inherited from Publisher.) |
![]() |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() |
ConnectionClosed | Event used to signal when the connection (input stream) was closed for any reason. (Inherited from Publisher.) |
Name | Description | |
---|---|---|
![]() |
incomingPackEvent | Event signaling that a packet arrived. (Inherited from Publisher.) |
![]() |
isAlive | Boolean indicating whether the stream is still alive and able to receive new packages. (Inherited from Publisher.) |
![]() |
isEnabled | Boolean indicating whether the publisher is currently active, publishing packages. (Inherited from Publisher.) |
![]() |
packQueue | Queue that stores incoming packets. (Inherited from Publisher.) |
![]() |
publisherThread | Thread that will run the reception and publication of packs. (Inherited from Publisher.) |
The following example code shows two ways of instantiating a new TCPPublisher
public void NewTCPPublisherExampleMethod()
{
var publisher = new TCPPublisher("127.0.0.1", 1975);
}
public void NewTCPPublisherExampleMethod()
{
TcpClient client = new TcpClient(ip, port);
var publisher = new TCPPublisher(client.GetStream());
}
NETLIB.TCP Namespace
NETLIB.Publisher
NETLIB.BasePack
NETLIB.Consumer(TPack)
A Sandcastle Documented Class Library
Send comments on this topic to [](mailto:?Subject=A Sandcastle Documented Class Library)
-
NETLIB Namespace
-
BasePack Class
- BasePack Constructor
- BasePack Properties
-
BasePack Methods
- BasePack.DeepCopy Method
- BasePack.GetBool Method
- BasePack.GetByte Method
- BasePack.GetChar Method
- BasePack.GetDouble Method
- BasePack.GetFloat Method
- BasePack.GetInt Method
- BasePack.GetPackable(CustomType) Method
- BasePack.GetString Method
- BasePack.PutBool Method
- BasePack.PutByte Method
- BasePack.PutChar Method
- BasePack.PutDouble Method
- BasePack.PutFloat Method
- BasePack.PutInt Method
- BasePack.PutPackable(CustomType) Method
- BasePack.PutString Method
- BasePack.Read Method
- BasePack.Write Method
- BasePack Type Conversions
- BasePack Fields
- ConnectionClosedEventHandler Delegate
- ConnectionClosedEventHandler(Type) Delegate
- ConnectionClosedException Class
-
Consumer(TPack) Class
- Consumer(TPack) Constructor
- Consumer(TPack) Properties
-
Consumer(TPack) Methods
- Consumer(TPack).CloseConnection Method
- Consumer(TPack).Dispose Method
- Consumer(TPack).EndConsume Method
- Consumer(TPack).EndPublishConsume Method
- Consumer(TPack).Finalize Method
- Consumer(TPack).OnReceivedPackCall Method
- Consumer(TPack).PackFactory Method
- Consumer(TPack).SendPack Method
- Consumer(TPack).Start Method
- Consumer(TPack).StartConsume Method
- Consumer(TPack) Events
- ConsumerRunningException Class
- IOBasePackHandler Class
- IOPackHandler(TPack) Class
- IPackable Interface
- ListenerRunnigException Class
- Protocol(TPack) Class
-
Publisher Class
- Publisher Constructor
- Publisher Properties
- Publisher Methods
- Publisher Events
- Publisher Fields
- PublisherRunnigException Class
- ThrowPackEventHandler(TPack) Delegate
-
BasePack Class
- NETLIB.TCP Namespace
- NETLIB.TCP.Server Namespace