Receive(String,PubSubBuffer,PubSubHeaderData,Int32) Method
- Last UpdatedApr 08, 2026
- 2 minute read
public PubSubStatus Receive(
ref string Topic,
ref PubSubBuffer Buff,
ref PubSubHeaderData HeaderData,
int MaxWaitMSecs
)
public:
PubSubStatus Receive(
String^% Topic,
PubSubBuffer^% Buff,
PubSubHeaderData% HeaderData,
int MaxWaitMSecs
)
Parameters
- Topic
- The string to hold the received topic.
- Buff
- The PubSubBuffer to hold the received data.
- HeaderData
- The HeaderData enum variable to hold the routing information.
- MaxWaitMSecs
- The timeout value in milliseconds (0 means infinity).
Return Value
This command is used in conjunction with the blocking
This method is useful if the application wants to process messages in a synchronous manner from a special processing thread or a pool of such threads.
If the receive method is used with a global connection (as specified through using the Connect command with no arguments), then all
PubSubConnection PS = new PubSubConnection();
PS.OpenConnection("192.168.10.10", 5051);
PS.Subscribe("mySystem.MyTopic", PubSubUpdateFlag.PS_INTEGRITY);
while (true)
{
PS.Receive(topic, Buff, HeaderData, -1);
}
Reference
PubSubConnection Class
PubSubConnection Members
Overload List
Subscribe
Subscribe
Receive
Receive
Subscribe
Subscribe
Receive
Receive