Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP ToolTalk Programmer's Guide > Chapter 6 Participating in ToolTalk Sessions

Setting Up to Receive Messages

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

Before your application can receive messages from other applications, you must set up your process to watch for arriving messages. When a message arrives for your application, the file descriptor becomes active. The code you use to alert your application that the file descriptor is active depends on how your application is structured.

For example, a program can have a callback function invoked when the file descriptor becomes active. The following code sample invokes notify_set_input_func with the handle for the message object as a parameter.

	/*
* Arrange for a program to call receive_tt_message when the
* ToolTalk file descriptor becomes active.
*/
notify_set_input_func(base_frame,
(Notify_func)receive_tt_message,
ttfd);


Table 6-2 describes various window toolkits and the call used to watch for arriving messages.

Table 6-2 Code Used to Watch for Arriving Messages

Window ToolkitsCode Used
XViewnotify_set_input_func()
X Window System Xt (Intrinsics)XtAddInput() or XtAddAppInput()
Other toolkits including Xlib structured around select(2) or poll(2) system callsThe file descriptor returned by tt_fd().
 Note: Once the file descriptor is active and the select call exits, use tt_message_receive() to obtain a handle for the incoming message.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.