• 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
CFSocket event handler accessing GUI variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFSocket event handler accessing GUI variables


  • Subject: CFSocket event handler accessing GUI variables
  • From: Matt Wilks <email@hidden>
  • Date: Fri, 21 Jan 2005 11:48:21 -0500
  • Mail-followup-to: email@hidden
  • Organization: Computing and Networking Services

Hey,

I am using a CFSocket to monitor a BSD socket connection for incoming
data; defined like so:

	msock = CFSocketCreateWithNative(kCFAllocatorDefault, raw_socket,
						kCFSocketReadCallBack, &handleData, context);

The function handleData is defined as laid out in the API:

	void handleData(CFSocketRef s, CFSocketCallBackType type,
					CFDataRef address, const void *data, void *info)

I would like to be able to access the variables that control my GUI from
this functions (perhaps to change some state variable based on the input
from the socket).  However this function doesn't seem to be an instance
or class method, so I don't have a hook into the variables defined in
the scope of the calling class.  Is there some way around this that I
have missed?

Thanks for the help,
Matt.

--
Matthew Wilks
University of Toronto        Computing and Networking Services
(416) 978-3328               email@hidden
4 Bancroft Ave., Rm. 102     Toronto, ON  M5S 1C1
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CFSocket event handler accessing GUI variables
      • From: Frederick Cheung <email@hidden>
  • Prev by Date: RE: Re: Pictures as characters
  • Next by Date: Re: Re: Pictures as characters
  • Previous by thread: Service menu item that disappears or doesn't appear at all
  • Next by thread: Re: CFSocket event handler accessing GUI variables
  • Index(es):
    • Date
    • Thread