N
Naren
Victor Bazarov said:eType
How does the server know what combination of 'ID' and 'eType' to use?
What if there is no such "device" connected?
It doesn't have to be linear. You could cache the information in, say,
a map<>, it would speed up the search. Or you could simply keep the
list of your 'Mysock' objects _sorted_. That should speed up the search
Don't you mean "the Type class"?
the
Don't you mean "a Type object"?
What's "etype"? Is it the same as "eType"?
What's the meaning of a list of IDs in the "Newtype"?
Why not?
Sure. As soon as you explain what you expect us to help you with.
Designing a type or types requires understanding of the problem that
you're trying to solve. You showed us some implementation details,
which even according to you don't do the job, and you think we can
figure it out what you want, from them? You give our mind-reading
ability way too much credit.
Now, let's just reiterate what you said, and we can probably get to
mutual understanding a bit sooner.
- A connection is established by the client, and never by the server.
Or is that not so?
- Once a connection is established, its parameters (ID and eType) are
figured out. Or not. You didn't say how ID is assigned.
- To communicate to clients, the server sends commands identified by
command ID, and 'Type'. How does the server know what 'Type' to
use?
You see, perhaps you need to state your problem just a bit clearer...
V
Thank you for the advice
I think I should have been clear.
Let us assume there is a unit which gives ID,Type and command.
The server should have a list of cleint sockets(with their ID and
Type) and it should search through them and
send the command to the corresponding socket(device)
This is the transmitting part.
Coming to recieving part, the cleint connects to the server and sends
the first packet as ID and Type of itself(device). This should be
stored by the server for transmission of output packet.
multiple cleints(devices) can connect to the server
Is this pretty clear?
Can you kindly help again?
Thanks in advance.
Regards,
Naren.
-------------------------------------------
This message has been posted from News2Web
Your free, web based, news reading service
Visit us at http://www.news2web.com
(c) 1997 SoftCom Technology Consulting Inc.
-------------------------------------------