Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Jan 29, 2020 4:05 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: IPC Sockets
PostPosted: Wed Apr 06, 2011 8:05 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 7:57 am
Posts: 72
Location: Solihull UK
When using ipc sockets in plugin is the rx method an event I must define
Mark


Top
 Profile  
Reply with quote  
 Post subject: Re: IPC Sockets
PostPosted: Wed Apr 06, 2011 12:05 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
I think you're looking for the DataAvailable event. It fires when data is received by the socket.


Top
 Profile  
Reply with quote  
 Post subject: Re: IPC Sockets
PostPosted: Wed Apr 06, 2011 6:28 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 7:57 am
Posts: 72
Location: Solihull UK
Yes sorry I meant the data available event, I assume that I have to define the event within my plugin I have an instance of ip socket and have coded the connect and listen methods I guess that the data available event should be coded using REALgeteventinstance

Assuming also that the data available event is at event offset 0

Mark


Top
 Profile  
Reply with quote  
 Post subject: Re: IPC Sockets
PostPosted: Wed Apr 06, 2011 6:36 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 7:57 am
Posts: 72
Location: Solihull UK
I have been doing lots of investigation into the rb threading model and can see that using pthreads is not actually that bad really I had the ipc socket that I was using for comms between the thread instance and my other classes then it occurred to me hang on why do I not place the ipc socket comms inside the class in the plugin get the thread to then communicate with this and get the plugin to parse the data in he data available event and fire the necessary event in the plugin class.

Not sure if that will work but I am going to give it a try.

There is no reason why it should not work and keeps the comms inside the plugin and the thread, (pthread) that runs perfectly and talks back to the rb code using an ipc socket so why not the class in the plugin itself.

Mark


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group