hey Shachar, 2012/3/7 Shachar Shemesh <shac...@shemesh.biz>: > On 03/07/2012 07:27 AM, Jonathan Ben Avraham wrote: > > Hi linux-il colleagues, > In >= 2.6.31 are there any conditions under which a write to a connected UDP > socket can block? e.g. some change in routing or iface config after connect > and before write? udp socket doesn't need to use connect() but instead of sendto()
> Has anyone encountered a concrete exampe of a write to a > UDP socket that blocks? See test code below. That is, I am trying to > demonstrate that I can get to a situation where UDP write in fact does > block. > You might be interested in some sample code of tcp/udp socket: https://github.com/citypw/SCFE/tree/master/networking/userspace_socket > if (0 > (rc = connect(sd, (const struct sockaddr*)&serveraddr, > sizeof(serveraddr)))) { > printf("connect failed [%m]"); > exit(1); > } > I think you have written a tcp socket program. Am I right? -- GNU powered it... GPL protect it... God blessing it... regards Shawn _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il