473,513 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

InProc/OutProce memory sharing

I have two exes and would like to share a simple boolean variable among two
exes. The client will setup the value for hte boolean while the server will
read
it.How do I do that?
I have a Server.exe and I have a client.exe

Client.exe setups the value and I want my server.exe to read it.
I do not want to save to a file/db, I want to do it on the memory level.

Any pointers will be helpful
source
Mar 21 '06 #1
5 1063

you could use remoting.

Set up a the server.exe to accept client connections, and then have it
poll the server.exe for the value of the shared variable.

source wrote:
I have two exes and would like to share a simple boolean variable among two
exes. The client will setup the value for hte boolean while the server will
read
it.How do I do that?
I have a Server.exe and I have a client.exe

Client.exe setups the value and I want my server.exe to read it.
I do not want to save to a file/db, I want to do it on the memory level.

Any pointers will be helpful
source

Mar 22 '06 #2
John,
Could you be little more specific.
I have tried using remoting and all that I could think of.
My problem is, I have a static structure which I try to access from my
client.
Now I am able to access the static properties exposed by my static structure
(class/structure) but when I am back on server the properties that were
initialized by client do not retain those values and when the server tries
to access those properties I do not get those values that were set by the
client.
So essentially the static properties do not retain the values when the
server tries to access them.

source
"John Bailo" <ja*****@texeme.com> wrote in message
news:44**************@texeme.com...

you could use remoting.

Set up a the server.exe to accept client connections, and then have it
poll the server.exe for the value of the shared variable.

source wrote:
I have two exes and would like to share a simple boolean variable among
two
exes. The client will setup the value for hte boolean while the server
will read
it.How do I do that?
I have a Server.exe and I have a client.exe

Client.exe setups the value and I want my server.exe to read it.
I do not want to save to a file/db, I want to do it on the memory level.

Any pointers will be helpful
source


Mar 22 '06 #3

Have you looked at all the Remoting examples for setting up a chat server?

Specifically, look at how it registers the list of names of people who
connect to the server.

As each client connects, it can read the list of available people. And
as that list changes, you can have a remoted event that updates the client.

You don't need to "poll" the server -- that's the beauty of remoting --
you can remote methods so that clients are automatically updated as
values on the server change.

source wrote:
John,
Could you be little more specific.
I have tried using remoting and all that I could think of.
My problem is, I have a static structure which I try to access from my
client.
Now I am able to access the static properties exposed by my static structure
(class/structure) but when I am back on server the properties that were
initialized by client do not retain those values and when the server tries
to access those properties I do not get those values that were set by the
client.
So essentially the static properties do not retain the values when the
server tries to access them.

source
"John Bailo" <ja*****@texeme.com> wrote in message
news:44**************@texeme.com...
you could use remoting.

Set up a the server.exe to accept client connections, and then have it
poll the server.exe for the value of the shared variable.

source wrote:
I have two exes and would like to share a simple boolean variable among
two
exes. The client will setup the value for hte boolean while the server
will read
it.How do I do that?
I have a Server.exe and I have a client.exe

Client.exe setups the value and I want my server.exe to read it.
I do not want to save to a file/db, I want to do it on the memory level.

Any pointers will be helpful
source

--
http://www.you-saw-it-here-first.com
fueled by Texeme Textcasting
Mar 22 '06 #4
Hello, source!

If the only thing you want do is reading bool flag then you can use named mutex object for this. If mutex is occupied that flag equals to true, otherwise - false. Or even better - you can check if mutex with special name exists then flag is true, otherwise - false.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Mar 22 '06 #5
Hello John,
I understand what you are trying to say that server does not need to poll
anything because it exposes the api for the client to do housekeeping.
I am refering to the chat application you mentioned.

But in my case, once the client connects, my client is going to initialize a
boolean, which my server has to READ it.
So I want a mechanism where if client initializes a variable, I wante the
server to read it.

In most of the chat applications I saw over the internet all the server does
is creates a channel and waits on
COnsole.Readline()
there is not interaction of the server with any of the datastructure that is
being used by the client.

So this brings me to wonder if in remoting can you get hold of an existing
instance of the server rather than creating a new instance of the server?
which will enable to share variables

source
"John Bailo" <ja*****@texeme.com> wrote in message
news:44************@texeme.com...

Have you looked at all the Remoting examples for setting up a chat server?

Specifically, look at how it registers the list of names of people who
connect to the server.

As each client connects, it can read the list of available people. And
as that list changes, you can have a remoted event that updates the
client.

You don't need to "poll" the server -- that's the beauty of remoting --
you can remote methods so that clients are automatically updated as values
on the server change.

source wrote:
John,
Could you be little more specific.
I have tried using remoting and all that I could think of.
My problem is, I have a static structure which I try to access from my
client.
Now I am able to access the static properties exposed by my static
structure (class/structure) but when I am back on server the properties
that were initialized by client do not retain those values and when the
server tries to access those properties I do not get those values that
were set by the client.
So essentially the static properties do not retain the values when the
server tries to access them.

source
"John Bailo" <ja*****@texeme.com> wrote in message
news:44**************@texeme.com...
you could use remoting.

Set up a the server.exe to accept client connections, and then have it
poll the server.exe for the value of the shared variable.

source wrote:
I have two exes and would like to share a simple boolean variable among
two
exes. The client will setup the value for hte boolean while the server
will read
it.How do I do that?
I have a Server.exe and I have a client.exe

Client.exe setups the value and I want my server.exe to read it.
I do not want to save to a file/db, I want to do it on the memory
level.

Any pointers will be helpful
source

--
http://www.you-saw-it-here-first.com
fueled by Texeme Textcasting

Mar 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1280
by: Bill Belliveau | last post by:
Hello all, I’m looking for some general information about sharing the session but haven’t found any resources that confirm my conceptions. All the discusisons about sharing the session...
0
919
by: Bill Belliveau | last post by:
Hello all, I’m looking for some general information about sharing the session but haven’t found any resources that confirm my conceptions. All the discusisons about sharing the session...
2
323
by: Bill Belliveau | last post by:
Hello all, I’m looking for some general information about sharing the session but haven’t found any resources that confirm my conceptions. All the discusisons about sharing the session...
1
5579
by: martinsmith160 | last post by:
Hi all I am trying to create a level builder tool for a final year project and im having some problems drawing. I have placed a picture box within a panel so i can scroll around the image which is...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.