[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Client/Server
In ns, agents are different from applications. You can model
application-level processing with an Application object, which then
controls a bunch of TCP/UDP/<whatever>P transport agents to simulate the
traffic. Whenever a request comes in, the server can open a new *P
connection with the client. In this way it simulates multi-threading
without ever need to do real multithreading.
Hope this helps.
On Fri, 5 May 2000, Sencun Zhu wrote:
> Date: Fri, 5 May 2000 20:43:23 -0400 (EDT)
> From: Sencun Zhu <[email protected]>
> To: [email protected]
> Subject: [ns] Client/Server
>
>
> Hi,all:
>
> What I want to do is: There is one server agent, waiting for requests
> randomly from many client agents, this server has a queue to keep these
> requests and processes them one by one. In ns, in order for the client to
> send data to server, usually we can write:
>
> $ns connect $client($i) $server
>
> for targetting,
> however, here is only one server and ns does not support
> multi-threads. To my understanding, an agent can only connect with one
> other agent, So if there are several client agents call this
> function, then only the last calling one really gets connection with
> server.
>
> Could anybody help me with this?
>
> thank you very much.
>
> Sencun
>
>