[ 
https://issues.apache.org/jira/browse/TS-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14746396#comment-14746396
 ] 

Bryan Call commented on TS-2520:
--------------------------------

Simple client to test it:
{code}
[bcall@homer test_code]$ cat test_tfo.cc
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <string.h>
#include <netdb.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>

int main() {
  int sd = socket(AF_INET, SOCK_STREAM, 6);
  const char* data = "GET / HTTP/1.1\r\nHost: foo.com\r\n\r\n";
  int data_len = strlen(data);

  // setup the hints
  struct addrinfo hints;
  memset(&hints, 0, sizeof(hints));
  hints.ai_family = PF_UNSPEC;
  hints.ai_socktype = SOCK_STREAM;

  // look up the address
  struct addrinfo *addr;
  getaddrinfo("localhost", "8080", &hints, &addr);

  ssize_t status = sendto(sd, (const void *) data, data_len, MSG_FASTOPEN,
                          (const struct sockaddr *) addr->ai_addr,
                          sizeof(struct sockaddr_in));
  if (status < 0) {
    fprintf(stderr, "sendto: %s\n", strerror(errno));
    exit(EXIT_FAILURE);
  }
  char buffer[4096];

  read(sd, buffer, sizeof(buffer));
  fprintf(stdout, "%s", buffer);
}
{code}

> Add TCP fastopen support for incoming TCP connections
> -----------------------------------------------------
>
>                 Key: TS-2520
>                 URL: https://issues.apache.org/jira/browse/TS-2520
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Network
>            Reporter: Alex Sandro Garzão
>            Priority: Trivial
>             Fix For: 6.1.0
>
>
> TFO (TCP Fast Open) can be enabled on all listen sockets in the kernel. 
> Nevertheless, I would like that only ATS try using TFO.
> One possibility is a configuration variable that informs ATS to set 
> TCP_FASTOPEN.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to