• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Use CFMessagePort in CFM app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use CFMessagePort in CFM app?


  • Subject: Use CFMessagePort in CFM app?
  • From: "Jan E. Schotsman" <email@hidden>
  • Date: Tue, 8 Jun 2004 05:36:28 -0400

Hello,

I am beginning to feel I am trying to do the impossible (using message
ports in a CFM app).
I want to use the ports to communicate with a helper tool (which basically
calls MovieExportFromDataRefToProcedures in its main thread because some
QuickTime copmonents, notably sound components, are not thread safe yet).
I can load all the function pointers from CoreFoundation framework, no
problem there.
Calling CFMessagePortCreateLocal and CFMessagePortCreateLocal in an MP
thread seems to work.
I don't know what kCFRunLoopDefaultMode is, right now I m just guessing
CFSTR("").

Next problem is my port callbacks are never called. Is this a UPP-like
problem? Can I write some glue to make it work or is this a no-no?

The callbacks look like:

CFDataRef myPortMessageHandler( CFMessagePortRef /*local*/, SInt32
messageID, CFDataRef data, void *info )
{
// Cast info to my info

#if DPRINTING
dprintf( "Received message on client port\n" );
#endif

switch ( messageID )
{
case kDE_ServerMessageTypeOpen:

// Signal that server port is ready.
error = MPSignalSemaphore(
serverPortOpenSemaphore );
break;


case kDE_ServerMessageTypeFrameCompressed:
// Handle message
break;

case kDE_ServerMessageTypeClose:
// Handle message
break;
}


return nil;
}


Getting desperate,

Jan.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: OS X SOAP example code
  • Next by Date: Network setup
  • Previous by thread: Asynchronous OTConnect and Timeout
  • Next by thread: set UID scripts
  • Index(es):
    • Date
    • Thread