Arriverez-vous à regarder ça jusqu’au bout ?
yo | 22 04 2008Fans d’escalade (dont je fais partie) : voici ce qu’il faut parcourir pour grimper à El Chorro.
De la pub à la réalité
yo | 7 04 2008
De la pub à la réalité
Une centaine de produits comparés à leur pub et packaging. Saisissant !
[ads consumer products]
La guitare de Jon Burgerman
yo | 24 03 2008
La guitare de Jon Burgerman
Mmh, on irait prendre des cours rien que pour pouvoir la tenir.
[guitar pop art]
Console shelves
yo | 22 02 2008
La bibliocache (suite)
Une autre bibliothèque bien sympathique
[livres meubles cave cachette]
Winsock problem: connect() works on the client side but accept() blocks on the server side
yo | 29 01 2008While writing a proof-of-concept Winsock program, I run into an issue that is worth sharing, especially with Winsock beginners. I hadn’t done socket programming for a while, so forgive my stupidity.
Basically, I had the server code to do this :
-
while (true)
-
{
-
//…
-
serverSocket = socket(…);
-
setsockopt(serverSocket, SO_REUSEADDR, …);
-
bind(serverSocket, …);
-
listen(serverSocket, portNumber);
-
clientSocket = accept(…);
-
// do something with the client
-
}
This was working for the first 2 calls of the client, but at the 3rd call, the client’s connect() would work and the server would be stuck on the accept().
Foolish me! After a little investigation, I realized you don’t put the listen() call inside the server loop…
Here’s the proper code:
-
//…
-
serverSocket = socket(…);
-
setsockopt(serverSocket, SO_REUSEADDR, …);
-
bind(serverSocket, …);
-
listen(serverSocket, portNumber);
-
while (true)
-
{
-
clientSocket = accept(…);
-
// do something with the client
-
}
Hope this helps…
Esclaffades 2007
yo | 1 10 20075 minutes sur les Esclaffades 2007 de St-Hélen (22). La troupe de danse est Pied en Sol.
Alien le légume
yo | 19 08 2007
Alien le légume
Il fait quand même moins peur quand il est fait de légumes…
[alien cinema monstre]
Wall House
yo | 23 07 2007
Wall House
Dans ces conditions, je veux bien faire du camping.
[architecture house tent]
Ecrire avec la lumière
yo | 8 07 2007
Ecrire avec la lumière
Ecrire avec la lumière la nuit dans la ville (non ce n’est pas le titre d’un livre de Borhinger).
[city urban light night]






