Multiple sockets connected to one port

Hello I am running a LabVIEW VI that is based on the Labview TCPServer example. I am wondering what the best way to deal with multiple connections to a single port would be. For example I have a device(could be thought of as the same thing as the TCPClient vi) that connects to the server using the port number and the IP address. The communication works fine when there is only one device trying to connect to the server, the problem occurs when two devices try to connect to the server. When the first device connects all data sent shows up fine, when the second device connects, the status on the device indicates a proper connection but none of the data sent shows up on the server side. I assume that I must do something with the connection ID to distinguish between the two connections, but I was wondering if there was an example or something that deals with this issue, or if someone would like to explain how I could get the data to show up properly. Any help is appreciated, thanks!

I am hoping that there is something similar to the java api where there is some way I can start a new threads to handle multiple connections on the same port. I would assume that if java has it LabVIEW would have something similar. Unfortunately I am not sure how to go about finding out how to do such a thing in LabVIEW.
The way that I assume the TCPListen.vi works is that there is some mechanism polling the specified port and ip address waiting for a request for a connection. Once a request is received the VI creates a connection ID so that the other subvi's can perform operations on the specific connection. It also looks as though the TCPListen.vi continues to listen for new connections, because the clients indicate a connection when more then one of them are run trying to connect to the same port and IP.
So my question is either, how to start a parallel process to handle the new connections, or where can I find the new connection ID (because the indicator only shows the connection id of the first client to connect). Basically I am having trouble distinguishing between the multiple connections on the same port.I would like to keep all of the clients sending data through the same port if possible.Each client identifies itself in its data message so keeping the data organized is not a problem. 
I also looked at the data socket examples, mainly because the Java examples I was looking at used "Sockets". I ran into similar troubles finding a way to create distinguishable connections using DS's as well. Anyways, any help is appreciated. Thanks.

Similar Messages

  • Multiple db connections for one report

    Hi all,
    I am using Oracle Reports 10g R2. Could someone tell me if Oracle Reports supports multiple database connections for one rdf file, like this (using servlet)
    http://your_web_server:port_num/reports/rwservlet?server=server_name&report=myreport.rdf& userid1=username/password@my_db1&userid2=username/password@my_db2 &desformat=pdf&destype=cache
    I am asking this question because my report needs data from two separate Oracle databases.
    Edited by: user12239004 on Apr 27, 2010 2:14 AM

    No, you can only have one login.
    However, this is simple to resolve by creating a database link in one database to the other database.

  • Multiple socket connections with MIDP

    dear experts,
    I have a simple problem and I hope someone can help me to solve it.
    I need to open a socket connection from multiple MIDlets on the same port.
    This error occours when I try to make a socket push registration from the second (or third, or fourth...) midlet (I'm able to connect to the socket correctly from the first midlet that makes a push registration):
    PushProcessor.run Exceptionjava.io.IOException: ServerSocket Open
    java.io.IOException: ServerSocket Open
         at com.sun.midp.io.j2me.serversocket.Socket.open(+39)
         at com.sun.midp.io.j2me.socket.Protocol.openPrim(+127)
         at javax.microedition.io.Connector.openPrim(+121)
         at javax.microedition.io.Connector.open(+15)
         at javax.microedition.io.Connector.open(+6)
         at javax.microedition.io.Connector.open(+5)
         at it.myprj.midp.BasicPushMIDlet$PushProcessor.run(+16)
    I would know if push registry API allows to have multiple connection on the same socket port.
    any help is appreciated!
    giovanni

    in my opinion,
    due to the fact when an app binds one port and a second app tries to bind the same (@same time) there will ever be a exception (from my point of view)!
    an no i think that push registry cant register two apps on same port (eg datagram://5060)
    hope this helps
    chris

  • Multiple socket connection in TC65

    Hello!
    I connect TC65 with server by socket connection on port 23. I close this socket, output and input streams as well. Because I've read some information from server I want to connect to another device using socket connection on port 43 for example, but it seems it doesn't work. I guess in some way it could be done because I closed previous connection. Any advise?
    Luke

    ok. dear
    my another id is      [email protected]
    Right, I'm getting tired of this already.
    NO, I'm not going to send you any code, you lazy nitwit. Neither will anybody here.
    Your use of the imperative form in your question is rude. You may talk like that to your colleagues, but in a forum where people answer questions in their spare time and on a voluntary basis this is inacceptable.
    You didn't even bother to say "please", at the least. Not that this would have changed much, but at least you wouldn't have been barking.
    [url http://www.catb.org/~esr/faqs/smart-questions.html]This document might provide you some orientation.
    As for your problem, first find out what exactly it is you want to do. Search the web, as kajbj counselled, it's quite a common task. If you have a specific problem, ask. But, take my advice and never, never ever ask people to "send you code" in a forum.

  • Multiple seperate streams to one port?

    DEar all
    Thanks for your help yesterday. I've given up trying to encode data and then tx it over TCP - instead I'm just going to use RTP and encode to a file at the server.
    The next question I have is this:
    The server will receive many connections from many clients. When a client
    a) Can I use one (the same) port on the server for all clients to transmit their RTP to? If so how do I distinguish between the streams on the server? Or must I have separate ports for each incoming stream? If so, how do I find free ports for JMF to use?
    b) How can I identify a particular stream as being from a particular PC (as many maybe behind the same nat). Ideally I'd like to send an identification number first.
    c) How do I detect the end of the stream on the server? Or must the client tell the server via some other means?
    Thanks
    Gareth
    Edited by: 831660 on 28-Jan-2011 02:53

    a) Can I use one (the same) port on the server for all clients to transmit their RTP to? If so how do I distinguish between the streams on the server? Or must I have separate ports for each incoming stream? If so, how do I find free ports for JMF to use?You're supposed to use separate ports for each incoming stream. You should handle this situation using a normal "listen & fork" server routine.
    If you're unfamiliar with the concept, you have a server that listens for incoming requests on a well-known port, and then serves the request on "any available port". Essentially it listens for a request, and then forks off a thread to handle the connection for the client on another port. That way, the well-known port isn't ever "in use"...
    You'll just need to write a basic handshake protocol that your server and client can use. The server listens for requests on some defined port. When it receives a request from a client, it'll pick an unused port, transmit that port back to the client, and then start listening for an RTP connection on the port it told the client.
    b) How can I identify a particular stream as being from a particular PC (as many maybe behind the same nat). Ideally I'd like to send an identification number first.A solves this issue.
    c) How do I detect the end of the stream on the server? Or must the client tell the server via some other means?You're able to listen for the following events on an RTP session by registering a "ReceiveStreamListener" on your RTP session:
    -- NewReceiveStreamEvent, when a new stream arrives
    -- InactiveReceiveStreamEvent, when the stream becomes inactive
    -- ActiveReceiveStreamEvent, when the stream becomes active again after a previous inactive event was generated
    -- TimeoutEvent, when the stream times out.
    -- ByeEvent, when the stream is done.
    So, the end of a stream occurs when you receive a TimeoutEvent or a ByeEvent (which is a subclass of TimeoutEvent so you really only have to handle TimeoutEvents), and you may also possibly want to consider a InactiveReceiveStreamevent to be the end of a stream.

  • Multiple interfaces connected to one switch. Sol8 OK, Sol10 NOT.

    Hello,
    finally we got our T5220s and I connected everything as it should be mirroring our V880 with four QFE cards.
    I connected 14 gigabit ports to one switch and configured the interfaces.
    On our Solaris 8 system on the v880 with the 15 connected qfe ports there were no problems.
    Now on the Solaris 10 system, I can only configure one (1) interface and run packets to it. When I activate a second one, this is not seen from our application.
    The application waits for multicasts and creates a connection based on port numbers.
    I tried ip_forwarding per routeadm and directly on the interfaces. I reduced my interface to two. I can see traffic passing by the second interface, but the application does not.
    What I can see, is, that there are some new attributes coming with Solaris 10:
    # ndd -get /dev/ip ip_forwarding
    0
    ndd -get /dev/ip nxge0:ip_forwarding
    1
    ndd -get /dev/ip nxge1:ip_forwarding
    1
    nxge0: flags=201100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4,CoS> mtu 1500 index 4
    inet 133.78.240.202 netmask fffffff0 broadcast 133.78.240.207
    ether 0:21:28:30:1f:26
    nxge1: flags=201100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4,CoS> mtu 1500 index 6
    inet 133.78.240.218 netmask fffffff0 broadcast 133.78.240.223
    ether 0:21:28:30:1f:27
    Solaris 8:
    # ndd -get /dev/ip ip_forwarding
    1
    qfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
    inet 133.78.240.193 netmask fffffff0 broadcast 133.78.240.207
    ether 0:3:ba:34:10:c
    qfe4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
    inet 133.78.240.209 netmask fffffff0 broadcast 133.78.240.223
    ether 0:3:ba:31:74:f9
    This is a snoop of the second interface:
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45140 S=40051 Push Ack=1777937950 Seq=1225056817 Len=75 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45141 S=40052 Push Ack=1778148585 Seq=1225166751 Len=75 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45142 S=40053 Push Ack=1778403447 Seq=1225321085 Len=75 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45143 S=40054 Push Ack=1778602744 Seq=1225572285 Len=75 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45144 S=40055 Push Ack=1778775342 Seq=1225720418 Len=75 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45147 S=40058 Push Ack=1779282787 Seq=1226316480 Len=75 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45148 S=40059 Push Ack=1779556928 Seq=1226498643 Len=75 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45150 S=40061 Push Ack=1779894075 Seq=1226894702 Len=75 Win=33580
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40052 S=45141 Push Ack=1225166826 Seq=1778148585 Len=74 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40054 S=45143 Push Ack=1225572360 Seq=1778602744 Len=74 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40059 S=45148 Ack=1226498718 Seq=1779556928 Len=0 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40058 S=45147 Ack=1226316555 Seq=1779282787 Len=0 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40055 S=45144 Ack=1225720493 Seq=1778775342 Len=0 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40061 S=45150 Ack=1226894777 Seq=1779894075 Len=0 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40053 S=45142 Ack=1225321160 Seq=1778403447 Len=0 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40051 S=45140 Ack=1225056892 Seq=1777937950 Len=0 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40055 S=45144 Push Ack=1225720493 Seq=1778775342 Len=74 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40058 S=45147 Push Ack=1226316555 Seq=1779282787 Len=74 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40051 S=45140 Push Ack=1225056892 Seq=1777937950 Len=74 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40053 S=45142 Push Ack=1225321160 Seq=1778403447 Len=74 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40059 S=45148 Push Ack=1226498718 Seq=1779556928 Len=74 Win=24820
    con3sun2-qfe9 -> con1pcc1-nxge1 TCP D=40061 S=45150 Push Ack=1226894777 Seq=1779894075 Len=74 Win=24820
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45141 S=40052 Ack=1778148659 Seq=1225166826 Len=0 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45147 S=40058 Ack=1779282861 Seq=1226316555 Len=0 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45144 S=40055 Ack=1778775416 Seq=1225720493 Len=0 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45143 S=40054 Ack=1778602818 Seq=1225572360 Len=0 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45140 S=40051 Ack=1777938024 Seq=1225056892 Len=0 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45150 S=40061 Ack=1779894149 Seq=1226894777 Len=0 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45148 S=40059 Ack=1779557002 Seq=1226498718 Len=0 Win=33580
    con1pcc1-nxge1 -> con3sun2-qfe9 TCP D=45142 S=40053 Ack=1778403521 Seq=1225321160 Len=0 Win=33580
    What is blocking the communication?
    Kind regards. Oliver

    hi, perhaps you have to do some configuration with routeadm ? and enable ip_forwarding ? (man routeadm)
    root@sps-dump-001 /: routeadm
                  Configuration   Current              Current
                         Option   Configuration        System State
                   IPv4 routing   disabled             disabled
                   IPv6 routing   disabled             disabled
                IPv4 forwarding   disabled             disabled
                IPv6 forwarding   disabled             disabled
               Routing services   "route:default ripng:default"
    Routing daemons:
                          STATE   FMRI
                       disabled   svc:/network/routing/legacy-routing:ipv4
                       disabled   svc:/network/routing/legacy-routing:ipv6
                       disabled   svc:/network/routing/ndp:default
                       disabled   svc:/network/routing/rdisc:default
                       disabled   svc:/network/routing/ripng:default
                       disabled   svc:/network/routing/route:default
    root@sps-dump-001 /:

  • Can I have multiple clouds connected to one id?

    I have 5 phones and several iPads connected to one id and sharing one cloud. We share music and contacts however, when one phone rings, all phones ring. When one of us is texting, we all can see who is being texted but can't read the text. Is there anyway to unlink the phones AND still share music on this id?

    Welcome to the Apple Community.
    You can all share an ID for iTunes, but all have your own ID for iCloud.

  • Multiple Socket Connections

    Hi,
    i need to simulate a http-POST by using a StreamConnection.
    This has to happen a lot of times, one post after the other.
    Server is closing the socket after each POST, so that i have to call a Connector.open(...) before each POST.
    The Problem now is, that the 3rd ED devices i use are showing the IAP-Dialog, asking for a new Connection to a IAP, although the old internet connection is still open.
    Is there any way to prevent this problem and make the client ask for Access Point connection only with the first Connector.open(..) call?
    Best Regards,
    Andi

    The domein is not changing, i wrote a small testcode to simulatre this problem.
    here you are:
    private StreamConnection streamConnection = null;
    private String connectString = "socket://www.someaddress.com:80";
    for( int i = 0; i<5; i++ )
    try
    streamConnection = (StreamConnection)Connector.open(connectString);
    catch( Exception e){}
    finally
    try{
    if(streamConnection != null)
    streamConnection.close();
    }catch(Exception ignore){}
    }This code is showing the question for internet access point five times.
    Problem is that we need the close of the socket, because of the servers architecture.
    Best Regards
    Andi

  • Multiple ethernet connections in one computer?

    I have two ethernet connections in my computer (2 IP Addr) I would like one connection to talk to a PLC(UPD) While the other (wireless) to talk to a printer across the room (TCP Visa Resource- open and write) Is this possible in LV7.1

    jaggedmedia wrote:
    > I have two ethernet connections in my computer (2 IP Addr) I would
    > like one connection to talk to a PLC(UPD) While the other (wireless)
    > to talk to a printer across the room (TCP Visa Resource- open and
    > write) Is this possible in LV7.1
    There should be no problem. Assuming your network is setup properly and
    each network card has its own subnet, the TCP/IP socket driver should
    route any package through the correct network interface.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Force RMI client to connect to one Port

    Hi,
    Is there a way to force an RMI client to connect to a specific port.
    Any hint will be greatly appreciated
    Wafic

    Not really since it needs 2 ports, one for the RMI registry and other for the remote object.
    You can set these ports to what you like though (not the same).
    First port you set when you create/start your rmiregistry, the second when you create the UnicastRemoteObject, in its constructor you can specify it with the constructor UnicastRemoteObject(int port).
    This is only available since JDK1.2 though. When you connect with the client to the rmiregistry and the remote object, you specify the port in the URL from the client side like:
    rmi://localhost:port/remoteobjectname
    just replace localhost with the address of the server.
    The remote object port is passed to the client by the rmiregistry.

  • Multiple PPPoE connections on one Mac

    Hi,
    I have two PPPoE type connections on my MBP; one is meant only for downloading whilst the other is my main browsing, mail, etc account.
    The problem I have is this, before getting the second ISP account that I use for major downloading, I had just one PPPoE connection that I used for everything. Now that they are separate, I have the main one (the one I use for my mail and browsing, etc) set to connect when needed, hence it connects automatically when my MBP starts up due to the fact that my mail starts up on login.
    I can manually disconnect it and connect the other account (downloading account) then use that connection for whatever it is that I download or stream, but the problem comes in when the other PPPoE account connects (because I never close my mail, only hide it).
    So I am a little concerned that the wrong PPPoE connection might be used to download/stream my media. And, yes it is important that the accounts are used for different processes. With two PPPoE connections active (never knew that was even possible), I have been left with the option of removing the "connect when needed" option from my default connections meaning I now (It sounds lazy, I know...) I must click connect for each account when they are needed and that being as soon as I switch my MBP on.
    Any assistance would be greatly appreciated, thank you much!
    Kal

    Never mind, I figured it out. Set the service order appropriately.

  • Multiple sockets - many client one server

    I have multiple clients (a handfull) that will be sending a lot of messages per second. I have one server that I want to handle all of those methods. From what I've seen, there are some good multi-threading examples out there. I have seen one or two things about using socketchannels. what is the best approach to this problem, and how does it work?

    jobocop17 wrote:
    I have multiple clients (a handfull) that will be sending a lot of messages per second. What is a "lot"?
    10 or 10,000?
    Is that the sustained rate or the burst rate?
    What is the size of each message?
    What processing must occur for each message?
    Must every message succeed? Must it succeed the first time?
    I have one server that I want to handle all of those methodsSimply might not be possible depending on the answers to the above. Or might be trivially simple.

  • Multiple dates connecting to one timedimension in SSAS

    Hi,
    I have Three dates in my FactSales - Deliverydate, shippingdate, shippingdateconformed - at the moment deliverydate is connected to the Time dimension. How do I connect the other two dates to the same Time dimension?

    Hi ,
    You can create One Time Dimension with following Keys ;
    Deliverydate Key , shippingdate Key, shippingdateconformed Key and Date Key and then in fact table create 3 relationdhip using Date Key .
    Deliverydate Key -> DateKEY
    shippingdate Key -> DateKEY
    shippingdateconformed Key -> DateKEY
    For Example :
    Relationship like ;
    If you  are talking about Role Playing Dimension .
    Kindly follow below link;
    http://www.mssqltips.com/sqlservertip/3117/defining-role-playing-dimensions-for-sql-server-analysis-services/
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

  • Multiple iPods connected to one PC?

    I have just purchased a iPod Nano for my wife. I would like to digitize and organize music for the Nano on the same PC that I have been using for my iPod 40g. I seem to be able to create a new folder that digitizes and seems to organize music for her, but when I open iTunes software it still shows my iPod 40g library not hers.
    How can I set up an area for a library on the same PC for the iPod Nano to collect songs and update the Nano without interfering with management of the songs in the library for my other iPod?
    Is it a matter of having two versions of iTunes on the PC in different folders?

    Hey Paul:
    Just to let you know that you can set each iPod's preference differently even if you are using the exact same iTunes library!
    One thing I always recommend is creating a playlist or playlists for each and every single iPod on your computer. We have seven iPods that we are using with the exact same iTunes library.
    Now, how do you do it? It's fairly simple.
    The first step step is to craete an iPod specific playlist. So all you have to do is click on the little plus sign in the bottom left corner of iTunes and then type in the playlist's name (e.g. if it's your wife's playlist: <the name of your wife>'s playlist. Then you can connect the iPod. Once the iPod is connected you change that iPod's specific preferences by going to Edit>Preferences and selecting the iPod tab. Then all you have left to do is make sure you select "automatically update only selected playlists" and check your wife's playlist in the selection of playlists.
    You can repeat this step for as many iPods and people's playlists as you want....it's quite ingenuous!!!

  • Multiple computers connected to one monitor

    I have an HP Pavilion 23xi IPS Monitor. I currently have it connected to my new PC via and HDMI cable. Does this monitor have the capability to also be connected to an older computer via USB or VGA? If so, do I need to buy extra hardware, like a KVM switch? And can you recommend a good tutorial on how exactly this can be achieved?
    Thank you
    DaHowitzer

    Hello DaHowitzer,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand you are looking to connect your HP Pavilion 23xi IPS Monitor via either a USB or VGA connection. According to page 6 of the Pavilion IPS LED Backlit Monitors User Guide demonstrates how to connect via a VGA cable to your computer. As this monitor has a VGA port, but no USB port this is the method you need to use.
    I hope I have answered your question to your satisfaction. Thank you for posting on the HP Forums. Have a wonderful day!
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    Dunidar
    I work on behalf of HP
    Find out a bit more about me by checking out my profile!
    "Customers don’t expect you to be perfect. They do expect you to fix things when they go wrong." ~ Donald Porter

Maybe you are looking for

  • Yahoo account tied to iCloud account is not receiving pushed emails but another Yahoo account does

    3 days ago, I signed up for an email account through my previously established iCloud account which is tied to my Yahoo email address. Since then, I have not been receiving any Yahoo push notifications as I used to. This problem seems to be tied dire

  • Safari SnowLeopard no longer shows in desktop and applications!

    I have no idea how it disappeared off the face off my computers earth. Tried downloading all versions... No luck what so ever!!!! How do I get the same type of Safari for my MacBook without paying the price! I have a warranty and everything.. Please

  • FCS "ERROR: could not read block 74012 of relation1663/16385/16576: Input/output error."

    I would really appreciate some advice re: FInal Cut Server search errors. FCS has been running well with our Linux based raid Editshare for 4 years, notwithstanding the recent Mac OS Java security issues. Our FCS machine is running 10.6.8 mac os and

  • Exporting images changing sizes

    Hi, I am exporting some artwork with is on an A4 sized canvas and when I place that image into pages its half sized. I have reopened the .png in illustrator and it shows the correct size. Does anyone know if this is a problem with Illustrator or if i

  • Select query after the submit stmt

    Hi,   Have used the submit stmt as " SUBMIT pgm name WITH SELECTION-TABLE rspar_tab EXPORTING LIST TO MEMORY AND RETURN." Now the o/p generated is saved in the memory.In the report which is generated I have to fetch only 2 values based on one field a