How to retard tcp ack

Hi all!
I'd like to know if it is possible to retard the tcp ack.
I'll try to explain me better:
I am receiving important data through tcp: when I receive this data I don't want to send immediately the ack packet: it may occur that i receive the packet, I send the ack signal and then my system crash: this way the sender will not send me anymore the same datas, having received an ack, and crashing the data just received in my system would be lost.
The alternative would probably be give a sequence number to each packet and after elaborating the packet send that sequence number to the sender: I think this solution would work as well but I don't want the sender to create the sequence numbers for each packet.
So my question is: can I receive the pack, process it, and only then send the tcp ack?
Thanks all people

I wouldn't use the word "retard" in that context ... it's too loaded with other meanings ...
I'm pretty sure you can't control this in Java and I'm even more sure that you shouldn't.
What you want is an application-level acknowledge, and not misuse the TCP-level acknowledge for this. The TCP ACK is soley for transmission control, so that the stream works correctly and the other side knows that it can send some more data.
It was never intended as an acknowledge of the form "I've received your Data and have completely handled it!". This should be sent on the Application Level (i.e. as a separate message in your protocol).

Similar Messages

  • Detection of TCP ACK

    Hi!
    I'm writing a server - client (computer - mobile phone) application which need to be able to comunicate directly with each other. I need to send some kind of heartbeat to the client every few minutes to make sure it's still online. Also, it is crucial that traffic (in bytes) is minimized.
    My idea: Establish a (TCP) stream socket connection on startup. Every few minutes, send a one-byte-content packet from the server to the client, for example by
    OutputStream.write(int);
    OutputStream.flush();
    Since the TCP protocol makes sure that the client responds with an ACK packet once it has received the packet, this should be able to detect in the server application.
    The problem: how do I detect an TCP ACK packet in Java?
    An alternative is to make the client respond with a one-byte-content packet itself, but this doubles the traffic amount. I have many clients connected at once (in differend threads) and would prefer TCP over UDP.
    Any suggestions?
    Regards,
    Erik

    You can't detect a TCP ACK, it is hidden from the application by the transport. If you want an ACK at the application level you have to send it yourself.

  • How to use TCP Checksum Off-load in my network driver

    I am seeking infomation on how to use TCP Checksum Off-load to tell the Solaris 8 stack not to handle it for both receives and transmits (and let our NIC handle this compute-intensive task instead).
    There is mention that Sun GigabitEthernet Adapter cards, Release 1.1 supports Sol-2.6 use of NIC features: TCP checksum offload & byte swapping
    There are limited bits of info in include files. For example
    sys/strick.h indicates use of:
    inetcksum_t's ick_xmit
    stream.h has:
    struct datab's unsigned u16:16; /* used to store hw-calculated cksum
    #define STRUIO_IP 0x04 /* IP checksum stored in db_struioun */
    #define STRUIO_ZC 0x08 /* mblk eligible for zero-copy */
    strsub.h has:
    struct zero_copy_kstat
    Also /include/inet/tcp.h has tcp_sum for outbound.
    Thank you. -Weimin Tchen

    VenK7337,
    Could you show your python code. so we know what your are "writing" to the ethernet port?
    That way we can see what you are receiving.
    Parsing the incoming data (from the TCP-read) depends heavily on the device that sends it, and can not generically be described. LabVIEW has many byte (and even bit) manipulation functions to convert many different data formats to its own build in formats.
    So after the TCP listener is connected, you are constantly reading from the established connection (until it gets broken of course). More advanced example would be the internet toolkit if oyu have it.
    From the read characters (and I hope you designed a protocol with a clear starting character, ending character and maybe even a build in checksum) you parse the data and perform you action, and of course generate a reply. Again the internet toolkit is a good example. It parsed the input as it comes it, based on the HTTP format. Then generates the reply based on the request received.
    These days I would suggest not to use binairy encoded numerics. Try and use XML formatted data. Yes, it causes a lot of overhead. But typically this is not an issue and makes the code a lot more portable and maintainable. Also makes it easier to interface with other languages/platforms.
    Umless of course you are looking at Khz data rates, then XML is not th preferred choice.
    Hope this helps...

  • How to make tcp have establish option's function or reflexive in ASA like icmp have echo reply

    how to make tcp have establish option's function or reflexive in ASA like icmp have echo reply
    rather than permit tcp in both side

    An ASA firewall is stateful.
    The reflexive access for TCP connections (or UDP flows) is allowed by default as the firewall checks for established connections prior to applying an access-list on traffic that arrives at an interface.
    Excerpted from this document (emphasis mine):
    "Here are the individual steps in detail:
    Packet is reached at the ingress interface.
    Once the packet reaches the internal buffer of the interface, the input counter of the interface is incremented by one.
    Cisco ASA will first verify if this is an existing connection by looking at its internal connection table details. If the packet flow matches an existing connection, then the access-control list (ACL) check is bypassed, and the packet is moved forward.
    If packet flow does not match an existing connection, then TCP state is verified. If it is a SYN packet or UDP packet, then the connection counter is incremented by one and the packet is sent for an ACL check. If it is not a SYN packet, the packet is dropped and the event is logged."

  • WAAS "TCP ACKed lost segment" message

    I have deployed a couple of WAAS units across a link and have issues.
    If I set everything to pass-thru, everything works OK (as no traffic is hitting any classifiers). The top line of my policy is basically a match-all pass-thru (just for testing).
    All ethernet ports are nailed to 100M/FD and run with clean stats.
    If I disable the pass thru rule and allow traffic to hit classifiers in my policy, I get issues for any classifiers that apply any form of acceleration.
    I have captured data using tethereal on the WAE's and am seeing "TCP ACKed lost segment" messages on the ACK frame of the SYN-SYN/ACK-ACK sequence of the TCP setup. I see this on the WAN port of one of my WAE's.
    Is this a symptom of a stateful firewall in my service providers network that is disrupting the WAAS discovery method ? My SP says that there are no FW's in the path, but I'm starting to wonder if I'm getting the whole story here.
    The code is 4.0.13.23.
    If I physically back-to-back the WAE's on the bench via a test router, they work fine!
    Any ideas ?
    Thanks

    Nigel,
    Do you have packet captures from both sides of the link? That's the quickest way to see of the final ACK for the optimized connection is being dropped.
    Zach

  • How to free tcp/ip port in Mac OS X v10.6 Snow Leopard

    weeks ago i installed graboid on my imac and it's having trouble downloading files. this is what appears whenever i open graboid:
    +SABnzbd.py 0.4.6 failed to start.+
    +The Graboid Download Manager needs a free tcp/ip port for its internal web service.+
    +Port 11234 on localhost was tried , but it is not available.+
    +Please ensure that your firewall grants access to GraboidDLManager.exe and port 11234 and 119 aren't blocked.+
    +Some other software may be using the port or the download manager is already running.+
    +Please verify that another instance of the download manager is not already running. To do this, press CTRLShiftEsc or open your task manager. Make sure the Processes tab is selected and look for "GraboidDLManager.exe" in the list. If it is there, click on it and then press the "End Process" button. After that, please restart Graboid.+
    +Open a Terminal window and type the line (example):+
    +/Applications/SABnzbd.app/Contents/Resources/SABnzbd.py --server localhost:11235+
    +Open a Terminal window and type the line (example):+
    +/Applications/SABnzbd.app/Contents/Resources/SABnzbd.py --server localhost:11235+
    "/>
    how do i free a port in snow leopard? i already allowed incoming connections from graboid in my security preferences but still it wouldn't work. help please. thanks

    Do you use a router to connect to the internet? If so the port needs to be mapped to your local machine.

  • How to define tcp wrappers for a new service in Solaris 10?

    Hi all, I need to setup tcp wrappers for a third-party software product with /etc/hosts.allow.
    I installed Trillium software on a new Solaris 10 server. It added this entry to /etc/inetd.conf:
    dscserv0_rel1300 stream tcp nowait tsadmin /usr/bin/env env -i HOME=/home/tsadmin LOGNAME=tsadmin /opt/trilv13/TrilliumSoftware/server/metabase/bin/mtb_server
    After the install, I ran inetconv and this new SMF service was created:
    *# svcs -a|grep dsc*
    online         13:22:57 svc:/network/dscserv0_rel1300/tcp:default
    Here's the problem: After this, all new connections were denied by default. I had to disable tcp wrappers with this command:
    inetadm -m svc:/network/dscserv0_rel1300/tcp:default tcp_wrappers=FALSE
    I would prefer to enable tcp wrappers, and put an entry into /etc/hosts.allow, but I can't figure out what service name to put into /etc/hosts.allow. I've read through the man pages but I can't identify the service name to use for this new service, and it won't accept the FMRI or an abbreviation of it either.
    How do I identify the service name to put into /etc/hosts.allow?

    At OS level, before entering Sql*Plus, do :
    $ EDITOR=vi; export EDITOR
    $ sqlplus ......
    Message was edited by:
    Paul M.
    Ciao Nicolas :-)

  • How to enable TCP Wrappers with SMF services?

    I am using a site.xml file to enable/disable services during a Jumpstart configuration. This works great.
    However, I can't yet figure out how to configure the various properties of those services, such as enabling TCP Wrappers for a service. I can set the properties of a service and verify that they are set, but a "svccfg extract" does not capture that information.
    Is this a short coming of svccfg extract? Or are the properties of a service stored and configured elsewhere?

    That will work, as will any path underneath
    /var/svc/manifest.Got it working...Exported the inetd configuration, set tcp_wrappers to false, dropped inetd.xml into my jumpstart tree, jumped a box, and tcp_wrappers came up enabled by default for my inetd services!
    What is the difference between the /var/svcs/profile and /var/svcs manifest directory? Is profile for enabling/disabling services and manifest for service configuration?
    Does /var/svcs/profile/site.xml and /var/svcs/manifest/whatever.xml get read on every system boot? If not, what is the appropriate procedure to "reinitialize" smf if you want to change the existing behaviour by having it reread those files?
    Hmm. The defaults get written on the inetd serviceI believe, so exporting that would give you the
    fragment
    you want.It did, and I was able to accomplish what I needed to do.
    Sorry that it's such a slog in the meanwhile.Will there be something before FCS in a couple weeks?
    I can definetly see the managability and robustness of SMF. It's just going to take time to learn it, and documentation is needed for that.
    Thanks for all your help!

  • How to use TCP socket in device driver

    I want to use network with TCP in device driver in kernel mode.
    I am using Solaris 8 x86.
    How can I do it?
    help!
    Are there any examples?
    How does the SUN RPC achieve this goal? Can you do some explain for me?

    To be clear, here is the sample code, i wrote a TestClass, and i want to send it and read it from the recieving side.
    class TestClass{
         String testSting = "i love you";
         int port = 1024;
    //send side
    TestClass tc = new TestClass();
    PrintWriter out=new PrintWriter(socket.getOutputStream());
    out.println(tc); //i am not sure if this is right
    //send side end
    //receive side
    BufferedReader buf =new BufferedReader(new InputStreamReader(client.getInputStream()));
    //then what can i do to buf to read out TestClass members? buf.readLine()?
    //receive side end

  • How to combine TCP communication VI to other Labview VI

    Hi, 
    I am doing a project that is a sport timing system. In my timing system, I am trying to communicate with another computer by using TCP/IP while the timing system is running.
    I am trying to combine it into a VI, I have tried to solve it by convert one of the VI to sub VI, but it doesn't work or 1 computer cannot run TCP VI and my Timing System at the same time.
    Can any one know how to solve this problem ?
    Attachments:
    3switch 3-2-2012.vi ‏14 KB
    timing system A 24-2-2012.vi ‏48 KB
    timing system b 1-3-2012.vi ‏29 KB

    Hi, 
    timing system b is a sport timing system that like a stopwatch with 24 three-input switch( 0s,2s or 50s will added to the total time if turn on 1 of them).
    TCP communicator active and passive are the other 2 VI. I want to combine  TCP communicator actives VI and timing system b' VI into a VI (that run in computer A).
    And the TCP communicator  passive is run in another computer( computer B). 
    about the stop button in timing system b's VI, the Vi can't function when I add a stop button in it, but it run normally once I removed the stop button. The timing system b is based on the NI tutorial or examples. I based on the example to design the stop watch function. 
    Please help me how to solve it.
    Thanks 
    Attachments:
    timing system b 1-3-2012.vi ‏29 KB
    a TCP Communicator - Passive.vi ‏33 KB
    a TCP communicator Active 1-3-2012.vi ‏31 KB

  • How to kill TCP-IP Listen or Open Connection while they are waiting to connect?

    We have an application that acts as a control panel for a customer's device.
    It connects to the device using TCP-IP.
    It can be configured to connect as a server (listener) or as a client.
    The user of this applicaiton must have the ability to disconnect from the device and point and connect to a different device at a different IP and port.
    When the user tries to connect to a device but can not (the device is not ready or the IP address is wrong) he wants to abort the connection, change the settings then restart the attempt to connect.  
    How do I stop the TCP-IP Listen or TCP-IP Open Connection VIs?  We typically use a timeout of a couple seconds and this is a long delay for a respond to the operator when he wants to abort the connection attempt.

    Thanks for the quick response. 
    I was hoping there was a more elegant Labview solution that may work for both the wait on listen and the connect VI.
    I tried to close the wait on listener by closing the ref from the create listener.
    That works.  See attached picture. I use a queue to send the abort message.  The wait on listen state will be blocked until either a connection is made or an abort message is sent via the queue.  If a message is sent, the dequeue vi unblocks and causes the listener reference to close which will kill the wait on listen VI.  If a TCP-IP connection is made it will close the queue reference which will kill the dequeue vi.
    I guess for the TCP-IP connect VI I can:
    A. Use a couple second time out that is tolerable to the operator if then abort the connection attempt. (like you suggested)
    or
    B. Create a VI with the TCP-IP Open Connection VI in it.  I can launch that VI dynamically and wait until done (invoke node Run VI with Wait Until Done set to true).  If a connection is made it will finish and I will read the outputs using an invoke node (Ctrl Val.Get).  If it needs to be aborted, I will abort the VI using an invoke node (VI Abort).
    Attachments:
    Wait on listener with Abort example..JPG ‏265 KB

  • VBAI Development Toolkit, Custom Plugin: How to get TCP data / connection ID configured in VBAI Communication Manager?

    Hello,
    I would like to create a custom plugin using the VBAI Dev. Toolkit. I'm using VBAI 2010 with LabView 2010.
    In this step I would like to send a TCP message over a TCP connection defined in VBAI Communication Manager. How can I get the open Connection ID? Or do I have to open the connection in the Plugin? In this case, how to get the defined TCP data from the Communication Manager?
    Thanks for your help.
    Best regards,
    Yellow

    Yes you could. You can even create a simple VBAI inspection that uses the TCP step and then migrate it to LabVIEW to see how VBAI opens the connection and uses it in the TCP step. It may be more involved if you want to allow the user to configure all the TCP settings (IP Address/port) and have all your custom steps use the same settings (maybe save them to an INI and have all steps use the same INI to get the settings).
    Hope this helps,
    Brad

  • How to know tcp/ip listener is running?

    my oracle server need to remote access, how can i know the
    tcp/ip listener is running. any command can doing this?
    Kelvin.
    null

    Did (lsnrctl status) return anything else?
    The subagent is (or was) Oracle lingo for the intelligent agent.
    I wouldn't worry about the subagent unless you want to use some
    of the advanced features of OEM.
    simon (guest) wrote:
    : Bill Anglea (guest) wrote:
    : : Kelvin Liu (guest) wrote:
    : : : my oracle server need to remote access, how can i know
    the
    : : : tcp/ip listener is running. any command can doing this?
    : : : Kelvin.
    : : lsnrctl status
    : Hi all,
    : I got the same problem, when I type lsnrctl status showed :
    : The db subagent is not started.
    : I don't know what the meaning?
    : Please e-mail to me for help!
    : Thank You !
    : Best of Regards,
    : Simon Ma
    null

  • ACE 30 waits for TCP ACK

    Hi,
    I'd like to solve the problem which occurs when our client communicates with http server through ACE SM. See picture attached.
    The problem is, that http response from server (200 OK) is divided into two packets. Both packets are sent by backend http server in rapid succession.
    ACE forwards the first packet, but then waits for ACK from client. Only then it sends the second one. It takes about 200ms until client sends ACK.
    One transaction consists of hunderds such http requests. It means that whole transaction takes approx. 25 seconds when is balanced by ACE. When I connect dirrectly to backend server the transaction takes approx. 5 seconds.
    I'm quite sure the problem is not related to TCP window.
    Is there any parameter on ACE which should affect this behaviour (waiting for the ACK before second packet is sent)? 
    Petr

    Hi Petr,
    Since your issue is solved now, You might want to check out this new product called ITD.
    Simple and faster solution:
    ITD provides :
    ASIC based multi-terabit/s L3/L4 load-balancing at line-rate
    No service module or external L3/L4 load-balancer needed. Every N7k port can be used as load-balancer.
    Redirect line-rate traffic to any devices, for example web cache engines, Web Accelerator Engines (WAE), video-caches, etc.
    Capability to create clusters of devices, for example, Firewalls, Intrusion Prevention System (IPS), or Web Application Firewall (WAF), Hadoop cluster
    IP-stickiness
    Resilient (like resilient ECMP)
    VIP based L4 load-balancing
    NAT (available for EFT/PoC). Allows non-DSR deployments.
    Weighted load-balancing
    Load-balances to large number of devices/servers
    ACL along with redirection and load balancing simultaneously.
    Bi-directional flow-coherency. Traffic from A-->B and B-->A goes to same node.
    Order of magnitude OPEX savings : reduction in configuration, and ease of deployment
    Order of magnitude CAPEX savings : Wiring, Power, Rackspace and Cost savings
    The servers/appliances don’t have to be directly connected to N7k
    Monitoring the health of servers/appliances.
    N + M redundancy.
    Automatic failure handling of servers/appliances.
    VRF support, vPC support, VDC support
    Supported on both Nexus 7000 and Nexus 7700 series.
    Supports both IPv4 and IPv6
    N5k / N6k support : coming soon
    Blog
    At a glance
    ITD config guide
    Email Query or feedback:[email protected]

  • Ask help, How make my TCP server program stronger

    I'm develop a simple c/s program using TCP.
    I use recv (sock, buff, len, WAITALL) func recieving the message sent by client, if the client don't send enough lenth message, the server will block, how to resolve this problem.
    I'm a network programming beginner, could you give me some advise and information, thanks.

    It would be useful for you to read
    http://docs.sun.com/ab2/coll.45.13/NETP/
    especially "Overview of Sockets" and "Socket Basics".
    You can find there many code examples.
    And the general way to deal with stream message size
    is to put it into the message header. This will allow
    the receiver first to read the message size, and then
    the entire message.
    Enjoy!

Maybe you are looking for

  • How to modify Fileadapter filename with val from JMS msg using xsl?

    In my case I need to name the file based on information received in a JMS message. I would like to receive an xml document from a JMS queue, the document will contain content as well as the name of a file to be saved off. I found references to someth

  • Yellow tinted display

    Is anyone else still experiencing a yellow tinted display screen after "restoring" to 5A347? I'm wondering if this problem is isolated to my phone, and it could be exchanged for a new one.

  • Parallel processing in MRP

    CAn anybody tell me  the use of parallel processing in MD01 screen... SAP help tells the following.. But I cant understand that.. PLease help me get a clarification. Karthick P

  • Unable to use page protection in smartform

    I am working on a smartform but i am unable to use the checkbox page protection anywhere in the po form.  What do I have to change so I can use this option?

  • Create Entity Object from Service interface?

    An option for creating an EO is to use a "Business Components service interface". Is this referring to a App Mod service interface, web service WSDL or what? Am having a real problem attempting to decipher this and cannot find any mention of how to d