Transfering sound via TCP or UDP without delay.

Hi,
I'm trying to transfert music via TCP or UDP. But I have delays between packets of bytes that i'm sending and receiving.
I have sound, delay, sound, delay. Here's my to VI, server and client.
http://osiris.teccart.qc.ca/osiris/soundserverudp.vi
http://osiris.teccart.qc.ca/osiris/soundclientudp.vi
Can someone tell me what i'm doing wrong?

Hi,
try change order Sound subVIs.
Look to exampe: ...National Instruments\LabVIEW 7.1\examples\sound\sound adv.llb\Continuous Sound Output.vi
When I change size of 'Number of buffers' to 3 and more I hearing continuous sound.
Have a nice day.
JCC

Similar Messages

  • J2ME: arrays of doubles via TCP or UDP

    I'm grappling with the limitations of J2ME; I have a program which produces a bunch of doubles (about three 3x3 arrays); I need to send these via ethernet to a number of embedded java boards(ajile) which need these to run PID programs individually. J2ME doesn't handle doubles so I'm thinking of converting the doubles to bytes, and then to bytestreambuffers and send these over the network. Can anyone show me how to do this or a better way? Thanks

    You can get the bits from a double with 'long Double.doubleToLongBits(double value)' which is a static in Double. From there it's easy to get the 8 bytes from the long and write them to a socket. Assuming that your devices use IEEE 754 floating point numbers, you can give them the bytes.

  • How do I transfer a sound file via TCP?

    I have a .wav file that I'm trying transfer via TCP.  Using LV 8.5, I modified the "Sound File to Output.vi" example to send the data across a TCP connection to a client vi.  But, I've encountered numerous errors along the way with trying to convert the sound data which is a  1-D array of waveform double.  I've attached my server and client VI, but essentially, what I tried to do is break down the array into the y and dt components, send those over the TCP connection, rebuild the waveform client-side, and then play the waveform.  Is there something I'm missing?  Do I need the timestamp information as well and send that over too?  Please let me know how this can be accomplished.  Thanks!
    Attachments:
    Streaming Music - Server.vi ‏97 KB
    Streaming Music - Client.vi ‏65 KB

    One thing to clarify: While the Sound Output Write does not need the dt information, the dt information wouold be required when you use the Configure VI in order to set up the rate.  However, you only need to send that parameter once. Thus, it would seem to me that you want to change your client code so that it checks to see if it receives a special command or something to indicate the start of a new song that may have been sampled at a different rate. If this is the case, then you can reconfigure the sound output. Otherwise, all that you're listening for is just song data that you send along to the Sound Output Write.

  • CUSP changing transport to TCP from UDP in VIA headers

    How does CUSP decide when to use TCP vs UDP when forwarding INVITES to CUCM when both UDP and TCP are configured on the Network Listen Ports?  We have two different calls flows coming from our SBC to CUSP.  Both INVITES have UDP as the transport.  CUSP forwards one call flow to CUCM with TCP as the transport and the other as UDP. Is there something unique to the first INVITE below that would signal CUSP to use TCP?
    Invite from SBC that CUSP adds TCP as the transport in the VIA header towards CUCM
    40:13.979 On [2:245]10.XXX.XXX.XXX:5060 sent to 10.240.XXX.X:5060
    INVITE sip:XXXXXXXXXX@cusplab:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.XXX.XXX.XXX:5060;branch=z9hG4bKm2u8f32038e12is8p3v1.1
    From: "Test User 1" <sip:[email protected]:5060>;tag=SDi82if02-13984769016573306_c2b04.1.2.1378274120440.0_1121221_2220804
    To: <sip:[email protected]>
    Call-ID: SDi82if02-2664bc8b12611edfd30a0552529e0b90-cggngq0
    CSeq: 2 INVITE
    Session-Expires: 1800
    Min-SE: 1800
    Allow-Events: telephone-event
    Cisco-Guid: 3327242752-0000065536-0000181788-1640976394
    Acme-Call-ID: 9AA7C362-1BBC11E3-81019B0F-C8BF5371
    Timestamp: 1379084661
    Expires: 180
    Supported: timer,replaces,sdp-anat
    P-Asserted-Identity: "Test User 1" <sip:[email protected]>
    Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Max-Forwards: 59
    Contact: <sip:10.XXX.XXX.XXX:5060;transport=udp>
    Content-Length: 325
    Content-Disposition: session; handling=required
    Content-Type: application/sdp
    v=0
    o=CiscoSystemsSIP-GW-UserAgent 2487 3295 IN IP4 10.XXX.XXX.XXX
    s=SIP Call
    c=IN IP4 10.XXX.XXX.XXX
    t=0 0
    m=audio 55178 RTP/AVP 18 100 101
    c=IN IP4 10.XXX.XXX.XXX
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:100 X-NSE/8000
    a=fmtp:100 192-194
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=ptime:20
    INVITE from SBC that CUSP adds UDP as the transport in the VIA header
    15:14.881 On [2:245]10.XXX.XXX.XXX:5060 sent to 10.240.XXX.X:5060
    INVITE sip:XXXXXXXXXX@cusplab:5060 SIP/2.0
    Via: SIP/2.0/UDP 10.XXX.XXX.XXX:5060;branch=z9hG4bKg04f5a105040ei4764o1.1
    From: "Test User 2" <sip:[email protected]:5060>;tag=SDdeh1202-125657148404519E-4_c2b09.2.1.1376631876821.0_2507555_4963634
    To: <sip:[email protected]>
    Call-ID: SDdeh1202-c8199578035cb96793dbe0fb6ef98d84-cggjoq2
    CSeq: 2 INVITE
    P-Asserted-Identity: "WIRELESS CALLER" <sip:[email protected]:5060>
    Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK
    Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay,  multipart/mixed
    Max-Forwards: 64
    Contact: <sip:10.XXX.XXX.XXX:5060;transport=udp>
    Content-Length: 266
    Content-Disposition: session; handling=required
    Content-Type: application/sdp
    v=0
    o=Sonus_UAC 12183 15514 IN IP4 10.XXX.XXX.XXX
    s=SIP Media Capabilities
    c=IN IP4 10.XXX.XXX.XXX
    t=0 0
    m=audio 55134 RTP/AVP 18 0 100
    a=rtpmap:18 G729/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:100 telephone-event/8000
    a=fmtp:100 0-15
    a=sendrecv
    a=maxptime:30

    Hi. Did you ever find out the reason and a solution to this problem. I am having the same issue where CUSP decides to change the transport type to TCP (from UDP) when talking to CUCM on certain invites from Acme SBC. On some invites from the same Acme SBC, CUSP doesn't change the transport type and leaves it as UDP.
    Thank you.

  • How to Ping Hardware via TCP/IP

    I need to ping a device to check connectivity via TCP/IP.  I'm currently using a 3rd party control that has a memory leak.  Is there a way to do this within Labview without using a 3rd Party control?

    [SOLVED]
    Hi
    I need to check several devices by pinging them.
    I don't want to use the windows console method with parsing.
    If I use the ping.llb described under the second link above the labview runtime is crahing latest after 12 hours without any replies. Ping frequency was 400 ms, 1 second would be OK but not nice.
    After all the crashs I decide to use the .net Framework which includes an own Ping class.
    Attached you can find this, at the moment test,  VI which is running in a mini project on my PC.
    For testing purposes I set the delay time constant low, later my wish is something between 400-100ms.
    Problem: If you open the WinXP task manager the used memory of process "labview.exe" is rising rapidly until .net throw an exeption.
    How can I prevent that the memory is rising until a crash occur??? If I reduce the time the memory usage is rising as well, just slow....
    Here is the link to the class description: http://msdn.microsoft.com/en-us/library/system.net.networkinformation.ping.aspx
    Thanks for your help
    Tim
    SOLUTION: I connected the "close reference" on the wrong wire....
    It seems to run even with 0 ms time constant (for testing). I have attached the corrected version.
    Message Edited by computerkammer on 05-17-2008 08:31 AM
    Attachments:
    pingdotnet1.vi ‏17 KB

  • Skype for Linux Listens on TCP and UDP 5744

    Hello all, I'm guessing that there's a simple answer to my inquiry that I overlooked in my web searches. I'm running the current version of Skype for Linux (which, as of this writing, is 4.3.0.37). While looking at my computer's running processes, I noticed Skype listens on ports TCP/5744 and UDP/5744 while logged in, allowing it to be a server for some sort of inbound connection. I cannot find any documentation or IANA port registration for Skype, so I posted in the community forum. Does any one know why Skype listens on those ports; and would I have an improved user experience if I permitted my firewall to allow inbound connections on those ports? Thanks!

    I've observed this: When I first logged in, I received an inbound connection on the TCP port from a Skype server (determined by Reverse DNS) that was repeated on regular intervals. On the UDP port, I saw what appears to be 'heartbeats' sent out from my Skype client to IPs residing on rather 'prestigious' networks around the World (no more than 50), with those hosts responding in turn. Now, both TCP and UDP connections have continuous activity, so much so, I recorded at least 4GBs of data being transferred in the course of eight ( hours. That equates to 2GB in both directions, bring the total to (at minimum) approximately 568 kb/s connection (factoring in other observations, giving approximations and not providing specifics). I want to note, this additional traffic is appears to be experienced by any client without a firewalled connection to the Internet. I'm now trying to understand how this additional traffic assists in the functioning of the Skype client. Thanks, all!

  • XModem via TCP for Java

    I am sure that many of you experienced developers have read requests in the past concerning implmentation of Ward Christenen's XModem protocol over a TCP socket. If not, well... you are about to...
    This is a major hack... but it is starting to come together... thanks to Fred Potter for his source code to start this project...
    Objective:
    Basically, I want to create a console application which accepts an incoming connection and starts the receive mode for a XModem file transfer. I am using CGTerm (for Commodore retrocomputing) but can test with HyperTerminal as well...
    The user who connects to the server selects SEND and the FILE to send for a XModem file transfer... and the transfer begins...
    The incoming blocks of 128 bytes are written to a file
    After the transfer is over the server disconnects the client terminal.
    Here is what I have so far:
    import java.net.*;
    import java.lang.*;
    import java.io.*;
    // X-Modem Server implementation via TCP/IP socket
    public class XServer {
    public static FileWriter fw;
    public static void main(String[] args) throws IOException {
    // define the file
    try {   
    fw = new FileWriter("filename.txt");
    } catch (Exception e) {
    System.out.println(e);
    System.exit(0);
    int port = Integer.parseInt(args[0]);
    ServerSocket server = new ServerSocket(port);
    System.out.println("X-Server v1.0 - waiting for connection");
    Socket client = server.accept();
    // Handle a connection and exit.
    try {
    InputStream inputStream = client.getInputStream();
    OutputStream outputStream = client.getOutputStream();
    new PrintStream(outputStream).println("Go to send file mode!"); // sent to client
    System.out.println("Ready to receive file via X-Modem...");
    * BEGIN TRANSFER HERE!
    // set the debug flag
    XModem.debug = true;
    * Here we are instantiating a new InputStream that represents the remote
    * file that we are receiving. In this single line we are attempting to
    * start the flow.
    * Behind The Scenes: We're sending a NAK across the serial line repeatedly
    * until we finaly start seeing the data flow. If we don't see the data
    * flow, then we throw an exception.
    System.out.println("Sending NAK to start receive mode...");
    InputStream incomingFile;
    try {
    incomingFile = new XModemRXStream(inputStream, outputStream);
    } catch (IOException e) {
    System.out.println("ERROR! Unable to start file transfer!");
    e.printStackTrace();
    return;
    System.out.println("Starting file transfer...");
    * Here we are reading from the incoming file, byte by byte, and printing out.
    * Behind The Scenes: Internally, the read() method is handling the task of
    * asking for the next data block from the remote computer, processing it (i.e.
    * parsing, running checksums), and then putting it in an internal buffer. Not
    * all calls to read() will request a new data block as each block contains at
    * least 128 bytes of data. Sometimes you will only hit the buffer.
    try {
    for (;;) {
    int c = incomingFile.read();
    if (c==-1)
    break; // End of File
    // print character / byte
    System.out.print(c+",");
    // write to file
    try {       
    //System.out.print(".");
    fw.write(c);
    } catch (Exception e) {
    System.out.println(e);
    System.exit(0);
    } catch (IOException e) {
    System.out.println("error while reading the incoming file.");
    e.printStackTrace();
    return;
    // done
    System.out.println("File sent.");
    new PrintStream(outputStream).println("");
    new PrintStream(outputStream).println("transfer successful!");
    } finally {
    //client.close();
    // save the file
    try {   
    fw.close();
    System.out.println("file saved.");
    } catch (Exception e) {
    System.out.println(e);
    System.exit(0);
    * XModem keeps track of settings that the Receive and Transmit Stream classes will
    * reference.
    * <p>Copyright: Copyright (c) 2004</p>
    * @author Fred Potter
    * @version 0.1
    class XModem {
    public static boolean debug = false;
    * XModemRXStream is an easy to use class for receiving files via the XModem protocol.
    * @author Fred Potter
    * @version 0.1
    class XModemRXStream
    extends InputStream {
    // CONSTANTS
    private static final int SOH = 0x01;
    private static final int EOT = 0x04;
    private static final int ACK = 0x06;
    private static final int NAK = 0x15;
    private static final int CAN = 0x18;
    private static final int CR = 0x0d;
    private static final int LF = 0x0a;
    private static final int EOF = 0x1a;
    // block size - DON'T CHANGE - I toyed with the idea of adding 1K support but the code is NOT there yet.
    private static final int bs = 128;
    // PRIVATE STUFF
    private int ebn; // expected incoming block #
    private byte[] data; // our data buffer
    private int dataPos; // our position with the data buffer
    private InputStream in;
    private OutputStream out;
    * Creates a new InputStream allowing you to read the incoming file. All of the XModem
    * protocol functions are handled transparently.
    * As soon as this class is instantiated, it will attempt to iniatate the transfer
    * with the remote computer - if unsuccessful, an IOException will be thrown. If it
    * is successful, reading may commense.
    * NOTE: It is important not to wait too long in between calls to read() - the remote
    * computer will resend a data block if too much time has passed or even just give up
    * on the transfer altogether.
    * @param in InputStream from Serial Line
    * @param out OutputStream from Serial Line
    public XModemRXStream(InputStream in, OutputStream out) throws
    IOException {
    this.in = in;
    this.out = out;
    // Initiate the receive sequence - basically, we send a NAK until the data
    // starts flowing.
    init:for (int t = 0; t < 10; t++) {
    if (XModem.debug) {
    System.out.println("Waiting for response [ try #" + t + " ]");
    long mark = System.currentTimeMillis();
    out.write(NAK);
    // Frequently check to see if the data is flowing, give up after a couple seconds.
    for (; ; ) {
    if (in.available() > 0) {
    break init;
    try {
    Thread.sleep(10);
    catch (Exception e) {}
    if (System.currentTimeMillis() - mark > 2000) {
    break;
    // We have either successfully negotiated the transfer, OR, it was
    // a failure and timed out. Check in.available() to see if we have incoming
    // bytes and that will be our sign.
    if (in.available() == 0) {
    throw new IOException();
    // Initialize some stuff
    ebn = 1; // the first block we see should be #1
    data = new byte[bs];
    dataPos = bs;
    * Reads the next block of data from the remote computer. Most of the real XModem protocol
    * is encapsulated within this method.
    * @throws IOException
    private synchronized void getNextBlock() throws IOException {
    if (XModem.debug) {
    //System.out.println("Getting block #" + ebn);
    // Read block into buffer. There is a 1 sec timeout for each character,
    // otherwise we NAK and start over.
    byte[] buffer;
    recv:for (; ; ) {
    buffer = new byte[bs + 4];
    for (int t = 0; t < 10; t++) {
    System.out.println("\nReceiving block [ #" + ebn + " ]");
    // Read in block
    buffer = new byte[buffer.length];
    for (int i = 0; i < buffer.length; i++) {
    int b = readTimed(1);
    // if EOT - don't worry about the rest of the block.
    if ( (i == 0) && (b == EOT)) {
    buffer[0] = (byte) (b & 0xff);
    break;
    // if CAN - the other side has cancelled the transfer
    if (b == CAN) {
    throw new IOException("cancelled");
    if (b < 0) {
    if (XModem.debug) {
    System.out.println("Time out... NAK'ing");
    out.write(NAK);
    continue recv;
    else {
    buffer[i] = (byte) (b & 0xFF);
    break;
    int type = buffer[0] & 0xff; // either SOH or EOT
    if (type == EOT) {
    if (XModem.debug) {
    System.out.println("EOT!");
    out.write(ACK);
    break;
    int bn = buffer[1] & 0xff; // block number
    int bnc = buffer[2] & 0xff; // one's complement to block #
    if (
    (bn != ebn) && (bn != (ebn - 1)) ||
    (bn + bnc != 255)) {
    if (XModem.debug) {
    System.out.println("NAK'ing type = " + type + " bn = " + bn +
    " ebn = " +
    ebn + " bnc = " + bnc);
    out.write(NAK);
    continue recv;
    byte chksum = buffer[ (buffer.length - 1)];
    byte echksum = 0;
    for (int i = 3; i < (buffer.length - 1); i++) {
    echksum = (byte) ( ( (echksum & 0xff) + (buffer[i] & 0xff)) & 0xff);
    if (chksum != echksum) {
    out.write(NAK);
    continue recv;
    out.write(ACK);
    if (ebn == 255) {
    ebn = 0;
    else {
    ebn++;
    break;
    // We got our block, now save it in our data buffer.
    data = new byte[bs];
    for (int i = 3; i < (buffer.length - 1); i++) {
    data[(i - 3)] = buffer;
    dataPos = 0;
    public synchronized int read() throws IOException {
    // If at the end of our buffer, refill it.
    if (dataPos == bs) {
    try {
    getNextBlock();
    catch (IOException e) {
    throw new IOException();
    // If we're still at end of buffer, say so.
    if ( dataPos == bs) {
    return -1;
    int d = data[dataPos];
    if (d == EOF)
    return -1;
    dataPos++;
    return d;
    * A wrapper around the native read() call that provides the ability
    * to timeout if no data is available within the specified timeout value.
    * @param timeout timeout value in seconds
    * @throws IOException
    * @return int an integer representing the byte value read.
    private int readTimed(int timeout) throws IOException {
    long start = System.currentTimeMillis();
    for (; ; ) {
    if (in.available() > 0) {
    return (in.read());
    try {
    Thread.sleep(10);
    catch (InterruptedException ex) {
    //if (System.currentTimeMillis() - start > timeout * 1000) {
    if (System.currentTimeMillis() - start > timeout * 5000) {
    return -1;
    Here was the output...
    Original file:
    (Commodore CBM SEQ file exported to PC using DirMaster)
    ��
    � �
    � ��� �� �� ��� ��
    � �� �� ���� �� ��� ��
    � ��� ����������������������������������������������
    �� ����� ������� ����� �� ����� ������ ����� ���
    � �� ������ ������ ��� ��� �� ��� ���� �� ������
    � � ���
    ����
    � � ��OWERED BY �OLOR 64 ��� V8
    �UNNING �ETWORK64 V1.26A

    �UPPORTING 38400 �AUD �ATES
    �����/����/�������

    �ESTING �CHO-�ET V1 BETA

    �EATURING �ESSAGES, �ILES,
    �ET�AIL, AND �NLINE �AMES!
    �YS�P: � � � � � � � � �

    �RESS ANY KEY TO LOGIN\C�
    The result when the file was uploaded and received by my XServer:
    ? ? ??OWERED BY ?OLOR 64 ??? V8
    ?UNNING ?ETWORK64 V1.26A
    ?UPPORTING 38400 ?AUD ?ATES
    ?ESTING ?CHO-?ET V1 BETA
    ?EATURING ?ESSAGES, ?ILES,
    ?ET?AIL, AND ?NLINE ?AMES!
    ?YS?P: ? ? ? ? ? ? ? ? ?
    ?RESS ANY KEY TO LOGIN\C?
    The result is different!
    Can someone help me along here... I have been trying to figure out how to do this for approx. a year or so... it has been a very slow process.
    I could use a guru to help me out so I can write the upload and download routines for my Commodore BBS PETSCII Emulation Server.
    Visit http://www.retrogradebbs.com for details.
    Thanks.
    Please help out a dedicated developer who is in over his head...
    -Dave

    Ok. Fair enough. What about general information about Xmodem. This is a hard project because of how obscure the legacy technology is that I am having to implement using Java and MySQL.
    I have two major issues which I have to figure out how to troubleshoot and debug, if possible.
    1. The 23+ blocks exception when a file is being received
    2. The exception which is thrown immediately if I try to receive a binary file instead of an ASCII file.
    I read that telnet is a 7-bit technology and that is why Xmodem, which is an 8-bit technology is not that popular as a viable protocol via telnet, whereas Kermit is, since it was developed for 7-bit systems, i.e. mainframes and minicomputers.
    Is this correct?
    If that is the case, why does www.serio.com have a viable X-Y-ZModem library available (for several hundred $$$ of course) which can be used with both RS-232 serial ports and TCP socket ports? Obviously, it can be done. They are the ONLY company with this library for sale for Java to do this. I cannot justify that $$$ amount for a mere hobby (writing the BBS emulation server for supporting Commodore PETSCII (CG) callers via CGTerm or a native C-64 terminal program using Jim Brain's TCPSER middleware, which emulates a Hayes modem via telnet for telBBSing/retrocomputing.
    I really want to learn how to implement a file transfer protocol, since back in the 80s, I used Xmodem, Punter, Y/Z Modem, etc., a lot to upload and download files via modem at baud rates of 2400, 14.4, 19.2, and 38.4, respectively.
    It's fun to learn how the old skool gurus of telecommunications technology did it. It is one thing to run a BBS which supports these technologies and features, and it is an entirely other thing to learn how to design and develop them yourself for implementation into a project such as I taken on.
    It CAN be done. It WILL be done. However, I have just started my exhaustive research on how it needs to be done. I have read up as much as I could on XModem by Ward C., the father of the protocol.
    But, I have no information to help me figure out why the communications are acting as they do so far.
    Can someone please download the xserver.zip file on my website at:
    www.retrogradebbs.com/projects/xserver.zip
    Compile it. Run it. Connect using HyperTerminal, Netrunner, or another telnet terminal emulation program which supports Xmodem file transfers using WinSock.
    See what happens. With finals due in the next two days, this project will have to be put on hold until after I submit my two final projects.
    If anyone knows what needs to be done to support both ASCII and BINARY file transfers via Xmodem via a socket instead of a modem with RTS/CTS hardware flow control, please respond.
    I know for a fact that this can be done.
    - Dave

  • I have problem in transfeering data using field point via tcp

    I am reading the values from the filed point, which is connected, to the RT controller and transferring the values to the client PC via TCP at a specified acquisition rate.
     Case1 when the acquisition rate is 0.1 minutes I get the values from the controller correctly i.e. 5v, 5v, and the chart shows no change. The timed out of the TCP read is default value i.e. is 250ms
     But when I change the acquisition rate to .5 minutes I get the values as 5v, 0v, 5v, and 0v. The time out of the TCP read is same as first case. The inputs to the field point are at the constant 5v.
    Please tell how to solve the problem so as to see the plot in the chart continuously as inputs for the field points the read
    ing are at constant rate of input 5v.

    Suresh,
    Since this question deals with using the LabVIEW TCP/IP functions, you are better off posting it to the LabVIEW discussion forum.
    Regards,
    Aaron

  • Our IT Director will not allow the appropriate TCP and UDP ports to be opened on the district WAN

    I have about 30 Apple TV Units and our IT Director will not allow the appropriate TCP and UDP ports to be opened on the district WAN.  When our teachers try to log on to Apple TV to broadcast lessons, websites, etc., they are booted off the network after about 20 minutes. 
    Any ideas for how I might solve this without having to hard-wire the Apple TV Units?

    Honestly, you do not.
    Either the IT director will cave and allow the appropriate ports or it doesn't work.
    Hard wiring the ATVs will not rectify the problem. 

  • 294.What is the difference between TCP and UDP

    What is the difference between TCP and UDP

    The difference between TCP and UDP is that UDP throws datagram packets over the wire not concerned whether it arrives at its destination or not. TCP attempts to facilitate the notion of a connection by requiring an acknowledgement by the recipient and continually resending the packets until it receives the acknowledgement or gets a timeout. In a way TCP can be thought of as a layer over UDP but it's more than that. A good analogy is the beginning of the school day vs the end of the school day. In the beginning children enter school in a line and in an orderly fashion. Each child is accounted for. Each child has a defined classroom destination. Likewise TCP packets are sequenced, accounted for, and have a certain destination. At the end of the day all the kids pour out of the building randomly with no regard of whether their buddies are on detention or not. Any particular kid could be heading straight home or to the mall and no accounting is taken. In the same way UPD packets are dispersed from the sender without regard for order. Any packet to make a pit stop at a particular router on the network and no accounting is done to ensure it makes it all the way to the recipient.

  • 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

  • My phone no longer outputs any sound via it's speakers

    iPhone 4S, iOS 6.1.3
    My phone no longer outputs any sound via it's speakers. I can hear sound with headphones and also if it is connected by the dock connector it will output sound to whatever it is connected to.
    I have tried plugging and unplugging headphones several times thinking that it is stuck in headphone mode but that did not resolve the problem. I tried a factory reset in case it was software related but that didn't fix it either. The phone is  out of warranty.
    Thanks.

    Bring your phone to Apple for out of warranty replacement.  In the US this will cost $199.

  • For 1/11/11 expert day: can hear sounds on headphones but no sound via the internal speakers

    HP Pavilion dv6135nr Notebook internal speakers have stopped working.  I can hear sounds on headphones but no sound via the internal speakers.  A search on HP customer care for my notebook yielded the download recommendation below, even though I had not stated my problem.  However, executing this download did NOT resolve the problem.  Please advise regarding resolution to inoperable speakers.  I do not know if all of my sound and audio settings are correct, but the mute is not on and the volume controls are properly set.  The default device is Conexant High Definition Audio output, per the sound and audio devices properties hardware  tab the device status states "this device is working properly."  Is it possible that a Skype or Foxfire update is in conflict with this device?  If so, how do I resolve this situation?
    Thank you.
    Description: This package contains the driver for the Conexant High Definition Audio Chip.
    PURPOSE: Routine Details and specifications File name:
    sp34204.exe [1/1, 1.38M]
    System requirements: HP SoftPaq Number SP32646, "Microsoft Universal Audio Architecture (UAA) Bus Driver for High Definition Audio," (or later) must be installed on the notebook before installing this SoftPaq. Look for HP SoftPaq Number SP32646 (or later) in the Software and Driver Downloads section of the www.hp.com website. Released: 2006-12-01 Version: 3.26.0.0 A Compatibility: Microsoft Windows XP Professional, Microsoft Windows XP Home Edition, Microsoft Windows XP Media Center, Microsoft Windows XP Fix/Enhancement: Fixes issue where the notebook speakers do not work after headphones or earphones are used for a while and then unplugged.

     Re: Fixes issue where the notebook speakers do not work after headphones or earphones are used for a while and then unplugged.
    HOW DO YOU FIX THIS?? I cannot find the correct Microsoft Universal Audio Architecture (UAA) Bus Driver for High Definition Audio that works with my computer...
    My computer:
    VISTA
    HP Compaq 2230s Notebook PC
    Everytime I use my headphones for more than an hour or two, the **bleep** audio will not play on my notebook's speakers, just through the headphones. Usually restarting a few times resolves the problem, but not this time. If I knew that HP computers sucked this much I would never have spent so much money on this one!!!
    Can you please tell me how to fix this problem once and for all? Thanks!!

  • HT4889 Transferred files via time machine and not log in password will not allow me to log in

    I have a new MacBook pro, I transferred files via time machine and a removable hard drive. Now new MacBook does not recognize the log in password. What can I do to reset the password?

    Did you migrate when you first booted up in Setup Assistant or did you migrate later? When you migrate later it can create a second account, check in Mac HD/Users to see if this is the situation.

  • 5.1 Sound via HDMI in Windows 7

    Hi there,
    I have a MBPr and have got the sound working via internal speakers and also can get surround sound via the optical connection. I'm trying to get surround sound working via the HDMI port though, but so far have had no luck.
    The system reports that there are only 2 channels available via the HDMI. Orginally it had them listed as nvidia HDMI Digital Audio, but after me messing around it's just labeled as generic HDMI Audio.
    Has anyone managed to get this working correctly? If so which drivers are needed as Windows just installs the generic ones. I've tried the Cirrus Logic and also the nvidia drivers, but they aren't recognised.
    Any help would be appriecated.
    Thanks.

    Same problem here. Did you ever figure it out?

Maybe you are looking for

  • Deleted line item in Purchase Order?

    Dear forumers, I need to display data for PO history from the SAP MM module, but I will also need to exclude deleted line item. Is it right to check for this deleted line item condition in the EKPO-LOEKZ field? But, what do the values ' ' and 'L' mea

  • Enterprise Server 220R 2 hard disk drives

    Hi Inside my recently inherited sun server 220R, i was told that there are 2 hard drives(are they called scsi?). My question is.. what command do i execute at the # (root ) prompt to see that there really are 2 hard disks? How can i select one out of

  • Solaris 10 boot oddity

    I'm pretty new to Solaris, but I have a pretty solid background in unixy/linuxy type OSes. I've been getting into Java lately so I figured I might as well install Solaris just cuz'. So I have my root account, and my "poweruser" account that's simply

  • What defines the values observable in a dropdown list?

    Hello everyone, We use a a dynamic entry list to define the input values of the user for 0CALMONTH. Therefor we chose a query on a multiprovider and selected 0CALMONTH for output. We also get now a nice dropdown list, BUT the values start 3.1995 and

  • Distinct rows from CRM Server

    Hi,     How can I get "Distinct" rows from CRM Server using Bdoc? As we use in sql server, select distinct empid from employee... Thanks Mateen