C# Class LCM.LCM.TCPProvider

LCM provider for the tcp: URL. All messages are sent to a central "hub" process (that must be started separately), which will relay the messages to all other processes. TCPService is an implementation of the hub process. The tcpq:// protocol is NOT suitable for real-time or high-bandwidth traffic. It is specifically designed for playing back a log file in a post-processing context (i.e., play back the log as fast as possible, but without dropping anything). The .NET implementation is functionally equal to the Java version.
Inheritance: Provider
Afficher le fichier Open project: mlab-upenn/arch-apex Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Close the TCP provider

Publish ( string channel, byte data, int offset, int length ) : void

Publish a message synchronously. However, if the server is not available, it will return immediately.

Subscribe ( string channel ) : void

Subscribe method

TCPProvider ( LCM lcm, URLParser up ) : System

TCP provider constructor

Unsubscribe ( string channel ) : void

Unsubscribe method

Private Methods

Méthode Description
PublishEx ( string channel, byte data, int offset, int length ) : void
SafeSleep ( int ms ) : void
SockWriteAndFlush ( byte b ) : void

Try to send message on socket. If the socket is not connected, we'll simply fail. The readerthread is responsible for maintaining a connection to the hub.

Method Details

Close() public méthode

Close the TCP provider
public Close ( ) : void
Résultat void

Publish() public méthode

Publish a message synchronously. However, if the server is not available, it will return immediately.
public Publish ( string channel, byte data, int offset, int length ) : void
channel string channel name
data byte data byte array
offset int offset of the data to write
length int length of the data to write
Résultat void

Subscribe() public méthode

Subscribe method
public Subscribe ( string channel ) : void
channel string channel name
Résultat void

TCPProvider() public méthode

TCP provider constructor
public TCPProvider ( LCM lcm, URLParser up ) : System
lcm LCM LCM object
up URLParser URL parser object
Résultat System

Unsubscribe() public méthode

Unsubscribe method
public Unsubscribe ( string channel ) : void
channel string channel name
Résultat void