Ciao a tutti, ho realizzato un programmino con Dev-c++ per spedire un'email in modalità sincrona.
Dove posso trovare un esempio su come si gestisce un socket per smtp in modalità asincrona?? Va bene anche un esempio per Visual C++.
Grazie
Daniele
Ciao a tutti, ho realizzato un programmino con Dev-c++ per spedire un'email in modalità sincrona.
Dove posso trovare un esempio su come si gestisce un socket per smtp in modalità asincrona?? Va bene anche un esempio per Visual C++.
Grazie
Daniele
dany
dipende dal sistema operativo e dal tipo di socket che usi.
per le socket standard basta fare un fcntl(sock, F_SETFD, O_NONBLOCK)
dove sock è il socket.
in windows usando le socket standard invece si usa
int p=1;
p=ioctlsocket(socket, FIONBIO, &p);
if(p==0)todo ok.