RAS Server allowing multiple clients in and telnet redirection to correct reciever.

Product being used:
IOS (tm) 3700 Software (C3725-ADVIPSERVICESK9-M), Version 12.3(26), RELEASE SOFTWARE (fc2)
cisco 3725 (R7000) processor (revision 0.1) with 118784K/12288K bytes of memory.
R7000 CPU at 240MHz, Implementation 39, Rev 3.3, 256KB L2 Cache
MICA-6DM Firmware: CP ver 2940 - 7/24/2002, SP ver 2940 - 7/24/2002.
Bridging software.
X.25 software, Version 3.0.0.
Primary Rate ISDN software, Version 1.1.
2 FastEthernet/IEEE 802.3 interface(s)
24 Serial network interface(s)
24 terminal line(s)
1 Channelized T1/PRI port(s)
In combination with a server running:
tac_plus version F4.0.3.alpha.v9 (Extended Tac_plus)
• The goal is create a RAS Server to allow multiple clients to call in and separate them via DNIS.
Then specify an auto-command to send the traffic to the correct receiver of that call.
We are not stuck on doing this with tacacs if there is a more efficient way of doing this.
The thought was to only send the authorization to tacacs to allow for the dnis map to point the traffic to the correct receiver.
aaa authentication login DIALIN none
aaa authorization exec DIALIN none
• If we set aaa authentication login DIALIN none it works without any issues but does not go to the tacacs server and therefore does not allow us to use the dnis map commands.
aaa authentication login DIALIN group AAA-mydial
aaa authorization exec DIALIN none
• If we set aaa authentication login DIALIN group AAA-mydial using the aaa group server tacacs+ AAA-mydial it goes out to the tacacs server as expected but then it requires a login ID at least in order to get into a session.
aaa authentication login DIALIN none
aaa authorization exec DIALIN group AAA-mydial
• When we change the aaa authorization exec DIALIN group AAA-mydial it fails and does not even send the information out to the tacacs server.
aaa authentication login DIALIN “see above for options “
aaa authorization exec DIALIN “see above for options”
aaa new-model
aaa group server tacacs+ AAA-2035554677
server 172.16.0.109
aaa group server tacacs+ AAA-2035554570
server 172.16.0.109
aaa group server tacacs+ AAA-2035554571
server 172.16.0.109
aaa group server tacacs+ AAA-mydial
server 172.16.0.109
aaa authentication login DIALIN none
aaa accounting exec default start-stop group AAA-2035554570
aaa dnis map enable
aaa dnis map 2035554677 authorization network group AAA-2035554677
aaa dnis map 2035554677 accounting network start-stop group AAA-2035554677
aaa dnis map 2035554570 authentication login group AAA-2035554570
aaa dnis map 2035554570 authorization network group AAA-2035554570
aaa dnis map 2035554570 accounting network start-stop group AAA-203554570
aaa dnis map 2035554571 authorization network group AAA-2035554571
aaa dnis map 2035554571 accounting network start-stop group AAA-2035554571
aaa session-id common
ip subnet-zero
ip cef
line con 0
line 65 88
no motd-banner
no exec-banner
privilege level 15
no vacant-message
login authentication DIALIN
modem Dialin
transport preferred none
transport output telnet
escape-character NONE
telnet transparent
line aux 0
line vty 0
exec-timeout 0 0
password cisco
line vty 1
exec-timeout 0 0
transport preferred telnet
transport input all

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
NOTHING LIKE ANSWERING YOUR OWN POST:::
--Well after looking around I found the following on a forum which seems to have gotten us to our destination but uses local authentication to direct the DNIS numbers to the correct receiving system.  Just need to give things a final polishing to make the configuration as clean as possible.
hostname Router
boot-start-marker
boot-end-marker
logging buffered 65536 debugging
enable password cisco
clock timezone EDT -5
clock summer-time EDT recurring
aaa new-model
aaa user profile TEST
aaa group server tacacs+ AAA-mydial
server 172.16.0.109
!!!!!  Below defines the AAA-mydial group you are sending the accounting information to.
aaa group server radius AAA-myradius
server 172.16.0.109 auth-port 1645 acct-port 1646
!!!!!  Below you are using the DNISTEST local group for authentication and authorization.
aaa authentication banner ^C^C
aaa authentication login DNISTEST local
aaa authorization exec DNISTEST local
aaa accounting update newinfo
aaa accounting connection DNISTEST start-stop group tacacs+ group AAA-mydial
aaa session-id common
ip subnet-zero
ip cef
ip audit po max-events 100
isdn switch-type primary-ni
isdn voice-call-failure 0
isdn logging
!!!!!  Below you are directing which DNIS number goes to which receiving host.
username cisco-kid password 0 cisco
username DNIS##1212 nopassword dnis
username DNIS##1212 autocommand telnet 172.16.0.5 22 /stream /quiet
username DNIS##4677 nopassword dnis
username DNIS##4677 autocommand telnet 172.16.0.6 22 /stream /quiet
username DNIS##4570 nopassword dnis
username DNIS##4570 autocommand telnet 172.16.0.7 22 /stream /quiet
controller T1 1/0
framing esf
linecode b8zs
pri-group timeslots 1-24
interface FastEthernet0/0
ip address 172.16.0.35 255.255.255.0
speed auto
full-duplex
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial1/0:23
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn incoming-voice modem
no cdp enable
interface Group-Async0
no ip address
encapsulation slip
dialer in-band
dialer-group 1
async mode interactive
group-range 65 88
interface Dialer0
no ip address
dialer in-band
dialer idle-timeout 3600
dialer-group 1
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.0.254
no ip http server
no ip http secure-server
ip tacacs source-interface FastEthernet0/0
dialer-list 1 protocol ip permit
!!!!!  Below you are further defining the tacacs server and the encryption key to be used.
tacacs-server host 172.16.0.109 key cisco
no tacacs-server directed-request
radius-server host 172.16.0.109 auth-port 1645 acct-port 1646 key ras-secret123
line con 0
!!!!!  Below you are directing all calls to go to DNISTEST for authentication, authorization, & accounting.
!!!!!  Then we are stripping all prompting so that the connection is completely clean.
!!!!!  The only issue was that the aaa banner was still there which is why there is a
!!!!!  “aaa authentication  banner ^C^C” above in the aaa section.
line 65 88
no motd-banner
no exec-banner
privilege level 15
authorization exec DNISTEST
accounting connection DNISTEST
no vacant-message
login authentication DNISTEST
modem Dialin
transport preferred none
transport output telnet
escape-character NONE
telnet transparent
line aux 0
line vty 0 4
exec-timeout 0 0
password cisco
transport preferred telnet
transport input all
transport output all
escape-character NONE
telnet transparent
end
tacacs+ config just needs to have an accounting log file defined and all output will be logged there:
Here is my tac_plus.cfg file:
===========================================================
key = "cisco"
accounting file = /var/log/tac_plus-f404.log
-----------------------  the info below this line is irrelevant  ---------------------------
---  Just from me trying to use tacacs for the authentication & authroization----
user = default {
        login = nopassword
        service = exec {
               autocmd = "telnet 172.16.0.5 22 /stream /quiet"
user = Router {
        login = nopassword
        member = dialup
group = dialup {
        default service = permit
        expires = "Apr 1 2010"
        service = exec {
                idletime = 15
                autocmd = "telnet 172.16.0.5 22 /stream /quiet"
        cmd = disconnect {
                permit .*
user = test {
        name = "Dial"
        login = nopassword
        member = dialup

Similar Messages

  • How to control one server with multiple clients via TCP/IP

    I am wanting to control a single server with multiple clients.  Only one client would be active at a time, so there would be no conflict.  I want to use TCP/IP.  So far, I have programmed a cluster that passes data back to the server with no problems.  The challenge come in when a second client is added to the mix.  I have't been able to figure out how to turn each client on and send the appropriate data and then turn it off so it doesn't keep sending the same data to the server. 
    Here are the things that I have considered and did some preliminary testing, but don't really know how to impliment:
    1.  Send a numeric on the front of the cluster packet that tells the server that data is on the way.
    2.  Send a boolean on the front of the cluster packet to somehow turn the server TCP/IP on.
    The problem I have found is that LabVIEW TCP/IP doesn't like to be turned on and off.  If it doesn't get the data it expects, it goes into a reset mode and that kills the response time.
    Any help?

    You should consider implementing a set of simple one-byte commands that can be sent back and forth between the Server and the Clients. You can base all of these ideas off the example in the Example Finder under Networking >> TCP and UDP called Multiple Connections - Server.
    You will have two loops in the server VI: one to wait for new connections, and one to send and receive data from the existing connections. For instance, after one of the clients connects, it can request control of the server to send data to it by sending the character "R" for request. Every time the send/receive loop of the Server executes, the first thing it can do is to check all the existing connections to see if any of the clients have sent a control request ("R"). If so, it will create a buffer (array) of control requests. This could be in the form of Connection IDs or indexes in the array for a particular Connection ID. Your choice.
    After the Server receives a request for contol, if it is not already under control by another client, then it can send a response to the first client on the control request list. For instance, the server could send the first client a "S" command for send. Note that after the clients send their control request, they should execute a TCP Read and wait indefinitely for the server to respond with the one-byte "S" command. Then, once the client in control is finished sending data to the server, it could send the character "X" telling the Server to release it from control.
    The example I mentioned above already does a similar thing. Note how when a client wants to disconnect, they send the letter "Q". You can see this in the Multiple Connections - Client VI. The Server then checks each individual connection to see if it's received this one-byte command, and if it has, it closes the connection to the client. This is what you would want to implement, but instead of having just one command, you'll have to distinguish between a few and build up a buffer of control requests.
    Finally, if a client does decide to disconnect in your application, they could send the command "Q" just like the example above. At this point, close the connection and remove that Connection ID from the array of connections. You will also have to handle the case that this client was in the request control waiting line when it disconnected, in which case you need to delete it from that array as well.
    This will definitely work for you, but it will take some work. Best of luck!
    Jarrod S.
    National Instruments

  • How does create a server with multiple Clients ?

    Any people can lead me .
    How does create a server with multiple Clients ?
    Thanks

    For a multithreaded server you will need a thread to listen and at least one thread per client. If the conversation is half duplex, one thread per client works very well, if it's full duplex you will find one thread to send and one to receive much easier to program.
    I posted a Simple Socket Server that uses 1+2*clients threads.

  • JCos (Java Connectors) from one GRC server to multiple clients on same DEV

    I have installed SAP GRC Access Controls RAR on a server.
    I have connected the RAR using JCo's to a client (800) on a DEV R/3 (4.7) box.  I have also performed analysis succesfully on the roles and users in this DEV client.
    I now have another development client on the DEV box (500) which I need to perform analysis for.  This client is HR specific.
    I know I can create a new JCo to connect to client 500.  But what will be the impact on my analysis results?  How will I distinguish between the results found from client 500 and those found from client 800?
    How would you suggest the best way of doing this?
    Many thanks in advance.

    You will need to create a second JCO to the second client as JCO's are client specific (username password combinations to log on etc etc)
    You distinguish the results in Risk ANalyses by choosing the JCO (system) when you create the reports eg: Client 500, Client 800 or ALL.
    It can be very confusing and you have to be careful otherwise you will interpret the results incorrectly.
    If your new client is HR specific make sure that you have the HR RTA installed as well and patch the HR and Non-HR RTAs up to the latest versions.

  • Using MDT 2013 for deploying Software from MDT Server to PC Client automatically and silently ?

    I have a trouble about deploying software from MDT 2013 server to PC Client , Can we using MDT 2013 for deploying software automatically and silently , that Users/Clients don't have to click "next,next" to install software ?
    If you have a solutions to deploying it , please share me about that solutions ?
    Thanks.
     

    you can make software silently with boot opción:
    with chocolatey opensource.
    or make software with switches
    here link to help you:
    http://blogs.itpro.es/octaviordz/2014/05/29/instalando-aplicaciones-con-chocolatey
    http://blogs.itpro.es/octaviordz/2014/06/05/integrando-chocolatey-a-mdt-2013-e-instalando-aplicaciones-de-forma-desatendida-en-windows-8-1/
    http://blogs.itpro.es/octaviordz/2014/10/31/probando-chocolatey-en-windows-10
    http://blogs.itpro.es/octaviordz/2012/07/10/aplicaciones-desatendidas
    MVP Jesús Octavio Rdz http://blogs.itpro.es/octaviordz

  • Server with multiple clients

    Hey all,
    I'm working on a simple Snake-like Java game - I'm done with the basics but I want to add in multiplayer capabilities. The game is not very complicated (hence I'm not posting on the game forum), but I have very little experience with network programming. I do know threading and GUI/Java2D stuff fairly well so that will be less of a problem. As far as the game itself goes, I want everybody to be able to see what everyone else is doing.
    As for the networking, basically what I want to do is as follows:
    1. One person runs the program and hits the "start server" button. This displays his IP and creates 7 new mini-screens for the other players. This also starts the server thread. (All of this is done already).
    2. The server thread will do a few things: 1) It will "listen" to any incoming connection requests and connect them to the server. 2) It will accept UDP datagram packets from the connected clients. It will process these and send the information to all the other clients. 3) It will monitor the state of the game and notify the clients about events like a player losing, the game ending, someone disconnecting.
    3. A client thread will be spawned in a program that connects to the server. The client thread will 1) send the server updated information on its state at set intervals. 2) Receive information from the server on the other clients at intervals.
    Obviously there is a whole lot more to consider, with special cases like someone disconnecting, the server crashing, etc. For right now, though, I just want to get the basics up.
    I've read through the Networking tutorials on this site, but I'm having trouble with a few design/technical issues even after looking through them.
    1. At a basic level, should I really be using UDP here? It seems like the better choice for fast games.
    2. Should I be using the MulticastSocket class? It seemed right initally but I got the impression that all clients I broadcast to would have to be in the same IP range, which is not the case here (I want Internet games to be possible).
    3. I'm not sure what I should be sending back and forth. From reading the tutorials my impression is that you can only send 256-long byte arrays in each packet. Does this mean I have to arbitrarily assign each byte in this array a meaning in the program? What if I have more than 256 bytes of info. to send?
    4. My basic idea was for the server to spawn and fork a thread for each of the connected clients, and for each client to spawn and fork a thread for all the other players in the game so that if someone crashes, disconnects, leaves, etc. only the thread responsible for displaying/updating their part stops. Is this the ideal setup? Is there a better way to handle this type of network model?
    5. The client/server need to be monitoring a few different things - should I just combine all this information into one big packet or separate it?
    Sorry for the long post, but I'm somewhat confused on what to do here.
    Thanks for the help!

    Thanks for the quick reply - I'll change around my design to use what you suggested. On a related note, how much slower, empirically, is TCP compared to UDP? For this application I need ping times between 300 and 500 ms for each of the clients.
    Also, regarding transferring information via TCP - since this is done with Buffered Read/writers can I transfer more back and forth? Basically I need to send the score (an int), as well as positional information for each player (could be as big as 50-100 ints). I'm worried that sending this volume of information is going to slow everything down quite a bit since not everyone has broadband. If I really have to be sending hundreds of ints a couple times a second to everyone, should I figure out a better way to do this? As long as each person's connection is at least 14k or so it should be ok, but it will also monopolize most of the bandwidth (at least with dialup connections).

  • Multiple Client Systems and Multiple Repositories

    Hello,
    The client I am working on is insisting that we create two repositories and connect one repository to an R/3 system, and one to an ECC system.
    Can this be done?! I keep insisting that this is against the basic principle of MDM to have 'one single version of the truth' and that having different data in different repositories is not true MDM.
    Can this even be done? Or can it be done if each repositories hold the same data?

    Hi Nichole,
    I agree with Shiv that this totally depends on your business requirement. You can have two repositories if there is business requirement, only need to be taken care of Sizing. As you are keeping the same data in two repositories rather than one so as per performance you should take care of required memory, hard disk size etc.
    e.g. There are scenarios where sometimes as per business requirement you have to create different repositories as per region. Like one for Europe, other for US etc.
    Regards,
    Mandeep Saini

  • How can I connect multiple clients to a single client ?

    I am currently developing an instant messaging program.I created a server and connected multiple clients to it by using thread logic.However I do not know how to connect multiple client to a single client.
    What shall I do for that?Does anybody know a good tutorial or sample program?Or shall anybody explain me what I shall do for building the Instant Messaging part of my chat program?
    Thank u in advance.

    You may use UDP multicast socket. But since you are using the UDP protocol you might risk losing the data that you send since UDP does not guarantee the safe transfer of data.
    Alternately, you might create a server that allows multiple client to connect to it whose connection Socket objects are then stored in a Vector <Socket> object. The server then sends back data to the connected client about the other clients connected to it. Now when the client wants to send data (like an IM) to another connected client, it has to send a request to the server specifying the client login name and the server in turn streams that particular client's Address and Port to the requesting client. The requesting client then initiates the connection with the other client and then starts a conversation. One more thing, when the client communicates it needs to send information to the server like the name by which it likes to be referenced. In this scenario the server acts like a central repository for clients to query the existence of other clients in the chat room. Each client here runs a thread that listens to incoming connections and when a connection is established, may be opens a IM window or something.
    The third option is to make the server to relay the information from one client to another. Like say, I'm connected to whoopy server and i want to send "Hello" to jackson, then i send the message (ie, Hello) along with the name of the client to which i wish to send it to (ie, jackson). The server then performs a lookup in its Vector <Socket> object and then initiates a connection with jackson and sends the information. However, this method is pretty costly in that you will be wasting a lot of processing behind the server.
    --Subhankar
    P.s. If you stumble upon any other brilliant ideas let me know.

  • Connecting to multiple clients

    I have a question. i have one client and one server. the server connects a client and send some data which i am able to achieve it. my question is (is there a way to connect the same server to multiple clients?) secondly i want to make a check lets say that one client machine can accept only 30 data like (Dell $30.00). once the client recieve 30 data my client should say that i am full and then the client should write the data to another client machine ? is it possible?

    If you feel like getting fancy, a scalable server could use NIO: http://java.sun.com/j2se/1.5.0/docs/guide/nio/index.html

  • How can Webservice manage client sections and send back messages to clients

    Hi all.
    I am starting working with Webservice (jax-ws). Now i can make a good server side and on client side i can use method interface on webservice server side.
    But i want to make a advance feature as Server side manage client section and can send back message to client when Server change status...
    I know RMI and Corba can seems to support to send back messages to sections of cliens right ?
    So Webservice can do it ? Please help me !
    Thanks
    Diego
    Edited by: ThuCT on Sep 14, 2010 1:57 AM

    Hi all.
    I am starting working with Webservice (jax-ws). Now i can make a good server side and on client side i can use method interface on webservice server side.
    But i want to make a advance feature as Server side manage client section and can send back message to client when Server change status...
    I know RMI and Corba can seems to support to send back messages to sections of cliens right ?
    So Webservice can do it ? Please help me !
    Thanks
    Diego
    Edited by: ThuCT on Sep 14, 2010 1:57 AM

  • RAS Server Issue - Uninstall/Install RAS

    Hi,
    I've posted a RAS Server issue several weeks ago and still, I haven't gotten my answer.
    With this, is it safe/possible to uninstall and install RAS Server? is it safe?
    Thanks,
    Ken

    CRSE is an OEM Product, log a case in SMP. these forums are for general use.

  • Can server side notify client automatically instead of client refreshing

    generally, when we get messages to client, we use refresh requests from server make changes. Dose anyone know in Java has any mechanism that the server can notify client automatically, and dosen't need the client request server initially?
    how to implement this?

    Thanx, but if not in Http, can java relealize this? For instance, use socket or something else?

  • Does Siebel Management Server supports multiple gtwy servers/siebelservers?

    Hello,
    Does Siebel Management Server supports multiple gtwy servers and siebel servers when running getservers.pl ?
    Does Siebel Management Agent service run under windows 2008 OS?
    Cheers
    Kota

    Hi,
    In addition to making sure Agent Proxy on all AD FS servers is enabled, please also verify that the IIS 6 Management Compatibility and
    IIS 6 Metabase Compatibility role services are installed. (Some AD FS 2.0 scripts depend on Internet Information Services (IIS) Windows Management Instrumentation (WMI) objects being installed.)
    Here are two links for your reference:
    Discovery Does Not Work in ADFS 2012 R2 MP
    http://blogs.technet.com/b/omx/archive/2014/05/07/discovery-does-not-work-in-adfs-2012-r2-mp.aspx
    http://scug.be/christopher/2012/03/07/opsmgr-scom-adfs-2-0-mp-discovery-issue/
    Regards,
    Yan Li
    Regards, Yan Li

  • How do I connect multiple telnet clients to a telnet server in LabVIEW?

    Good afternoon,
    I'm writing a telnet server in LabView 6.1 that needs to handle multiple clients. To do this, I modified the "viserver\runvi.llb" example to use the telnet VI's from the Internet Toolkit instead of the TCP VI's. Then I changed the Open VI Reference to point to my telnet handler. Right now my handler just echoes the characters received from the client.
    My software works ok for the first connection. After the server accepts two or more connections, characters typed in one client get echoed to all clients. In addition, only one client will accept characters at a time. The client accepting input changes randomly every few seconds as characters are entered.
    Has anyon
    e gotten the telnet VI's to run in parallel? Not sure if they are thread-safe or not. If you have some experience with this, I have attached my llb if you think you can help.
    Thanks!
    Chris Norris
    Carrier Access Corp.
    [email protected]
    (303) 218-5826
    Attachments:
    CAC_Telnet_Server.llb ‏92 KB

    I don't think there's a problem with the TCP/connection portion of things. My feeling is that the problem is lurking somewhere in the timing of the application, or in the way LabVIEW task scheduling/multitasking is working compared to the way you expect it to work.
    For instance, I'm wondering why you stuck with 25 seconds (25000 ms) as the timeout value for the Telnet Read in Telnet Handler.vi. I assume you're expecting LabVIEW to quickly "sleep" that while loop and move on to check on the while loops of any other Telnet Handler.vi instances that might have been spawned as a result of connection requests from other remote clients.
    Instead, it seems to me (on my system, anyway, with three simultaneous connections active) that LabVIEW is not cyc
    ling through the other Telnet Handler.vi instances as you expect, but is only getting to them to read a byte at a time each time the main loop iterates in response to a byte appearing from the first of the three remote clients.
    If you change the Telnet Read timeout to 50 ms instead, the behavior is closer to what you might expect, but still not perfect.
    Because timing/threading/scheduling is a complicated subject in LabVIEW, I'm going to give LabVIEW the benefit of the doubt and assume it's operating as designed. Maybe someone else can provide more insight into what's happening in this particular case, and whether reentrancy or something else is affecting things.
    One option I would consider if I were in your shoes: program a simpler version of things that mimics Date Server.vi and cycles through a queue of connections to service them without relying on spawning new reentrant instances of a handler VI.
    I realize that your version of things (along with the reentrancy example
    that ships with LabVIEW) is expressly intended to handle this daemon-style situation, but simpler may be better for the purposes of debugging and development ease.
    My two cents,
    John Lum
    National Instruments

  • Send data to multiple clients from a server

    My problem statement is this:
    A server is created, say X. Multiple clients are created, say A, B & C. If X sends a message to A it should reach only A and should not go to B or C. Similarly if X sends message to B it should not reach A or C. I made a one to one communication with the following code:
    //Server
    import java.io.*;
    import java.net.*;
    class X
    public static void main(String args[])throws Exception
    ServerSocket ss=new ServerSocket(4321);
    try
    Socket s=ss.accept();
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    DataOutputStream out = new DataOutputStream(s.getOutputStream());
    String str=in.readLine();
    out.writeBytes(str+"\n");
    s.close();
    ss.close();
    catch (IOException e){}
    //Client A
    import java.io.*;
    import java.net.*;
    class A
    public static void main(String args[])throws Exception
    try
    Socket s=new Socket("localhost",4321);
    BufferedReader in=new BufferedReader(new InputStreamReader(s.getInputStream()));
    System.out.println(in.readLine());
    s.close();
    catch(Exception e){}
    }But i dont know how to keep track of each client. Because all the clients sockets are created at the same port, ie. 4321. I think thread will help. But even then i dont know how to identify each client. Somebody please help. Thanks in advance.
    Edited by: sowndar on Dec 5, 2009 1:21 AM

    YoungWinston wrote:
    sowndar wrote:
    Ok. I think i have to attach an unique ID to each client message. So that, with the help of that ID, the server can identify each client. Have i caught ur point?If you don't mind using a port per client, you could do something like a receptionist taking incoming calls (on 4321 only).
    - Hi I'm Client xyz.
    - Hi Client xyz, please call me back on port abcd and I'll put you straight through to our server.
    Since 4321 is an "open line" you might have to have some sort of ID so that Clients know which return messages are meant for them, but messages on the other ports would all be direct Client to Server. Also, the Server is then is charge of port allocation and communication on the "open" port is kept to a minimum.4321 is the socket that the server is listening to. It's not what the actual communication will be carried out over. Run this, then telnet to port 12345 a few times
    public class TestServerSocket {
      public static void main(String[] args) throws Exception {
              ServerSocket server = new ServerSocket(12345);
              while (true) {
                   Socket socket = server.accept();
                   System.err.println(socket.getPort());
    }Notice how each inbound connection is allocated a unique outbound socket.

Maybe you are looking for

  • HDMI not being detected on Pavilion dm4

    Hello, I have a pavilion dm4-1165dx and for some reason my laptop won't detect the hdmi cable when I have it plugged into a tv. I have done this before and the labtop has connected and I was able to connect my xbox with the same cable so I know it's

  • How to combine book-files into one IND-file

    Hello, I'm trying to make one InDesign-file from the separate files included in a book. I know the book option Export to PDF but what I want is something like: add the pages of bookfile 1 to a new document, then add the pages of bookfile 2 to that ne

  • Bundle testing and best practices, bonus introduction

    Hi all, I'm new here and to ZenWorks, please be gentle While I'm aquainted with puppet and reasonably proficient with ansible, I've just taken on a number of Windows desktops. We're using ZCM to deploy software, and I'm testing to get aquainted. Thin

  • Why am I unable to to install XCode from the App Store?

    I'm running Mavericks (OS X 10.9.2) on my 2010 era Macbook Pro, and I installed the latest security update from Apple yesterday (4/23/2014). Today I'm trying to install XCode (because I need it for Maven and Unison), and when I click on the green "Do

  • How to update data into database from mx datagrid?

    Hello,      I am developing a native application. I have connected my application using HttpServices i.e. remote objects to spring mvc 2.5 application. I have done inserting and deleting data from database. Now I want to update the records from datag