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
ファイルを表示 Open project: mlab-upenn/arch-apex Class Usage Examples

Public Methods

Method 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

Method 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 method

Close the TCP provider
public Close ( ) : void
return void

Publish() public method

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
return void

Subscribe() public method

Subscribe method
public Subscribe ( string channel ) : void
channel string channel name
return void

TCPProvider() public method

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

Unsubscribe() public method

Unsubscribe method
public Unsubscribe ( string channel ) : void
channel string channel name
return void