|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jan 2006
Città: Lassù
Messaggi: 2842
|
[JAVA] socket
C'è un modo per far si che la accept() sia non bloccante?
__________________
Fa' che non turbi l'anima tua il triste spettacolo dell'ingiustizia umana; anch' essa, nell'economia divina, ha il suo valore. È sopra di essa che vedrai sorgere immancabilmente la giustizia di Dio. HO CONCLUSO EGREGIAMENTE TRATTATIVE CON OLTRE 90 UTENTI! ATTENZIONE: consiglio di evitare assolutamente trattative con l'utente Herant |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Nov 2005
Città: Texas
Messaggi: 1722
|
Quote:
Altrimenti sei obbligato a creare un thread per risolvere il problema High Flying Sottovento
__________________
In God we trust; all others bring data |
|
|
|
|
|
|
#3 |
|
Member
Iscritto dal: Oct 2004
Città: Bologna
Messaggi: 50
|
Spulciando in qua e in là ho visto ServerSocketChannel e SocketChannel in java.nio.channels .
Un ServerSocket ha un metodo getChannel() che dovrebbe appunto ritornare il ServerSocketChannel associato, su cui chiamare il metodo configureBlocking() ereditato da AbstractSelectableChannel. Tutto questo sulla carta, non l'ho mai fatto in pratica.
__________________
And the salad is frightful! I have an important message to deliver to all the cute people all over the world. If you're out there and you're cute, maybe you're beautiful. I just want to tell you something: there's more of us ugly mother-fuckers than you are, hey-y, so watch out. |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Jan 2006
Città: Lassù
Messaggi: 2842
|
proverò... grazie.
__________________
Fa' che non turbi l'anima tua il triste spettacolo dell'ingiustizia umana; anch' essa, nell'economia divina, ha il suo valore. È sopra di essa che vedrai sorgere immancabilmente la giustizia di Dio. HO CONCLUSO EGREGIAMENTE TRATTATIVE CON OLTRE 90 UTENTI! ATTENZIONE: consiglio di evitare assolutamente trattative con l'utente Herant |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 20:19.



















