🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Phuoc Can HUA Tue, 22 Apr 2003 07:15
Sending/ Receiving data via LAN
#16848
Author: Phuoc Can HUA
Date: Tue, 22 Apr 2003 07:15
23 lines
1600 bytes
I'm using two threads in a program. They are sharing a ring buffer. As soon 
as thread A has inserted a record in the buffer it will resume thread B. B 
will consume the data until the buffer (FIFO) is empty. Then it go to 
suspended state.

How can I do this with two applications via LAN (a data record has 2 
integers and 1 string)?
I assume that thread B can't be 'woken up' by thread A via LAN, does B has 
to poll the data?

I'm absolute newbie in LAN programming. So, all information is welcome.
By the way, is there any software which can simulate LAN on a single 
machine so that the applications can be run on one PC in the development 
phase.

Thanks
Phuoc Can HUA


-- 
_/\__/\__/\__/\__/\__/\_
www.huaonline.com
My Homepage is my Castle
Re: Sending/ Receiving data via LAN
#16857
Author: Remy Lebeau (TeamB)
Date: Tue, 22 Apr 2003 17:16
27 lines
2132 bytes
"Phuoc Can HUA" <home}a+t{huaonline.com> wrote in message
news:oprn0rrordbq7az6@newsgroups.borland.com...

> How can I do this with two applications via LAN (a
> data record has 2 integers and 1 string)? I assume that
> thread B can't be 'woken up' by thread A via LAN,
> does B has to poll the data?

That depends on how the two applications are communicating with each other
to begin with.  Are you using Named Pipes?  Sockets?  RPC?  ActiveX/COM?
Other?  Each one of those technologies handle data transmissions
differently.  Some need data to be polled periodically, while some trigger
notifications when data is available.

> By the way, is there any software which can simulate LAN
> on a single machine so that the applications can be run on
> one PC in the development phase.

Any of the above-mentioned technologies can be used in a single-PC
environment.  It's just a matter of specifying the appropriate connection
values that represent the local machine.  For example, named pipes can use
the local machine name that is returned by GetComputerName(), while sockets
can use the special loopback IP address "127.0.0.1".


Gambit
Re: Sending/ Receiving data via LAN
#16869
Author: Phuoc Can HUA
Date: Wed, 23 Apr 2003 01:26
29 lines
2103 bytes
On Tue, 22 Apr 2003 10:16:02 -0700, Remy Lebeau (TeamB) 
<gambit47@yahoo.com> wrote:

> That depends on how the two applications are communicating with each 
> other
> to begin with.  Are you using Named Pipes?  Sockets?  RPC?  ActiveX/COM?
> Other?  Each one of those technologies handle data transmissions
> differently.  Some need data to be polled periodically, while some 
> trigger
> notifications when data is available.
What can you suggest? Okay, I give you more details. What I need is...
- A kind of broadcast, it could be many clients and the server doesn't need 
to send to each client.
- Data sending out consists of 2 integers and one string (< 32 bytes).
- The data is a kind of events, there are clock ticks (few times per 1s) 
and from time to time (not more than once in 1s) there's a special event. 
The idea is have something running in synch with the server.
Bottom line, I need something with little delay for small data record, i.e. 
less protocol overhead, no security required.

What Can you recommend me? What's best supported in BCB5?

Thanks
Phuoc Can HUA

-- 
_/\__/\__/\__/\__/\__/\_
www.huaonline.com
My Homepage is my Castle
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads