/Users/andrea/_magisterarbeit/korpus/clean/testkorpus/35/file46.html NN ----------------------------------------- : Java NP Games NPS Forums NNS Welcome VV , , Guest NP . SENT Please VV login NN or CC register NN . SENT Login NN with IN username NN , , password NN and CC session NN length NN October NP 01 CD , , 2005 CD , , 05 CD . SENT 31 CD . SENT 39 CD am RB Java NP Games NPS Forums NNS A DT Java NP . SENT Net JJ Community NP Game NP Development NP Topics NNS Networking VVG Moderators NNS . SENT blahblahblahh NP , , Markus NP Persson NP NIO NP beginners NNS corner NN . SENT previous JJ next JJ Pages NPS . SENT 1 CD Author NN Topic NN . SENT NIO NP beginners NNS corner NN . SENT Read VVN 248 CD times NNS Matlu NP n NN 00 CD b SYM Offline NN Posts VVZ . SENT 44 CD Hasta NP La NP Victoria NP Siempre NP . SENT NIO NP beginners NNS corner NN . SENT on RB . SENT July NP 23 CD , , 2005 CD , , 04 CD . SENT 00 CD . SENT 52 RB am VBP Hello UH . SENT I'm NN experiencing VVG very RB annoying VVG problem NN while IN networking NN with IN old JJ IO NP , , so RB I PP decided VVD to TO try VV NIO NP . SENT I PP will MD keep VV old JJ IO NP for IN game NN client NN , , but CC I'll NP try VVP to TO re NN write VV the DT server NN code NN with IN NIO NP . SENT I PP read VVP documentation NN and CC several JJ articles NNS from IN internet NN , , but CC I PP still RB consider VVP myself PP total JJ NIO NP newbie NN and CC I PP could MD use VV some DT advice NN . SENT First JJ problem NN is VBZ with IN accepting VVG new JJ connections NNS . SENT In IN my PP$ current JJ IO NP library NN I PP have VHP dedicated VVN thread NN which WDT just RB stores VVZ new JJ connections NNS . SENT They PP are VBP read VVN asynchronously RB from IN main JJ server NN loop NN . SENT Something NN like IN this DT . SENT Code NP . SENT public JJ void NN run VVN while IN true JJ socket NN serverSocket NN . SENT accept VV . SENT synchronizedList NN . SENT add VV socket NN . SENT public JJ Socket NN getNewConnection NN return NN synchronizedList NN . SENT getFirstElement NN . SENT The DT question NN is VBZ , , what WP is VBZ the DT best JJS way NN to TO emulate VV this DT behavior NN with IN NIO NP . SENT I PP figured VVD I PP have VHP to TO initialize VV it PP following VVG way NN . SENT Code NP . SENT channel NN ServerSocketChannel NP . SENT open JJ . SENT channel NN . SENT socket NN . SENT bind NN new JJ InetSocketAddress NP portNumber NN . SENT channel NN . SENT configureBlocking VVG false JJ . SENT selector NN Selector NN . SENT open JJ . SENT key JJ channel NN . SENT register NN selector NN , , SelectionKey NP . SENT OP NN ACCEPT VV . SENT But CC what WP then RB . SENT Should MD I PP use VV Selector NN . SENT . SENT select VV . SENT Or CC Selector NN . SENT . SENT selectNow NN . SENT If IN they PP have VHP select JJ selectNow NN , , what WP is VBZ configureBlocking VVG for IN . SENT All RB I PP need VVP is VBZ to TO asynchronously RB poll VV this DT class NN and CC get VV new JJ connections NNS . SENT Probably RB I PP can MD do VV it PP . SENT same JJ way NN as IN in IN my PP$ IO NP example NN , , calling VVG BLOCKING VVG select JJ in IN dedicated JJ thread NN without IN dedicated JJ thread NN , , just RB calling VVG NON JJ BLOCKING VVG selectNow NN periodicallyIs NNS some DT approach NN better RBR . SENT Or CC it PP doesn't VVD matter NN . SENT Logged VVN Multiplayer NN Online JJ Gameshttp NP . SENT www JJ . SENT duelboard NN . SENT com NN blahblahblahh NN Moderator NN JGO NP Ninja NP Online JJ Posts VVZ . SENT 4090 CD . SENT oO NP grexengine NN . SENT com NN Oo NP . SENT Re NP . SENT NIO NP beginners NNS corner NN . SENT Reply VV 1 CD on RP . SENT July NP 23 CD , , 2005 CD , , 09 CD . SENT 12 CD . SENT 35 CD am RB http NN . SENT javagamesfactory NN . SENT org NP views NNS article NN . SENT title NN NIO NP 20 CD Networking NN 20 CD for IN 20 CD Games NPS Logged VVD The DT Java NP Games NPS Factory NP free JJ games NNS , , free JJ articles NNS , , and CC java NP developer NN tutorials NNS http NN . SENT javagamesfactory NN . SENT org NP Matlu NP n NN 00 CD b SYM Offline NN Posts VVZ . SENT 44 CD Hasta NP La NP Victoria NP Siempre NP . SENT Re NP . SENT NIO NP beginners NNS corner NN . SENT Reply VV 2 CD on RP . SENT July NP 23 CD , , 2005 CD , , 11 CD . SENT 59 CD . SENT 58 CD am RB Thank VV you PP . SENT BTW JJ for IN some DT reason NN I'm NN not RB able JJ to TO run VV any DT game NN from IN that DT site NN . SENT It PP always RB says VVZ . SENT unable JJ to TO run VV specified JJ configuration NN I PP have VHP windows NNS XP NP with IN j NN 2 CD re NN 1 LS . SENT 4 LS . SENT 2 CD 08 CD I PP also RB have VHP one CD comment NN to TO that DT article NN please VV note NN that IN I'm NP total JJ NIO NP newbie NN , , so RB I PP may MD be VB totaly RB wrong JJ . SENT So RB . SENT I PP don't VVD understand VV some DT statements NNS , , basically RB you PP are VBP saying VVG . SENT With IN old JJ IO NP you PP have VHP to TO periodically RB poll VV EACH DT connection NN , , which WDT is VBZ evil JJ . SENT With IN NIO NP you PP don't VVD have VH to TO poll VV , , you PP just RB ask VV . SENT what's NNS ready JJ . SENT . SENT Again RB , , I PP don't VVD know VV how WRB exactly RB is VBZ NIO NP implemented VVN , , but CC doesn't VVD it PP have VHP to TO do VV exactly RB same JJ thing NN internally RB . SENT To TO poll VV EACH DT connection NN , , each DT time NN you PP call VVP Selector NN . SENT . SENT select VV . SENT Just RB deffering VVG what WP you PP would MD do VV with IN old JJ IO NP to TO some DT internal JJ library NN . SENT In IN worse JJR case NN it PP happens VVZ in IN some DT java NP library NN , , in IN better JJR case NN it PP happens VVZ in IN some DT native JJ library NN . SENT Can MD you PP imagine VV how WRB else RB it PP could MD be VB implemented VVN . SENT By IN what WP other JJ miracle NN it PP could MD learn VV which WDT sockets NNS have VHP some DT data NNS ready JJ to TO read VV . SENT Aaaand NP , , finaly RB I PP have VHP one CD more JJR question NN . SENT With IN old JJ IO NP I'm NP using VVG single JJ data NNS buffer VV well RB , , I PP mean VVP plain JJ byte NN array NN , , which WDT is VBZ re NN used VVN for IN all DT connections NNS . SENT If IN I PP have VHP 1000 CD connections NNS , , I PP just RB iterate VV them PP periodically RB calling VVG InputStream NP . SENT . SENT available JJ and CC if IN any DT of IN them PP has VHZ enough JJ data NNS I PP read VVP immediatelly RB process VV them PP . SENT Is VBZ it PP possible JJ to TO achieve VV it PP with IN NIO NP . SENT As RB far RB as IN I PP understand VVP , , you PP MUST MD have VH dedicated VVN ByteBuffer NP for IN EACH DT connection NN because IN you PP never RB know VVP in IN advance NN have VHP many JJ bytes NNS available JJ , , so RB you PP must MD be VB prepared VVN to TO read VV incomplete JJ messages NNS . SENT Well RB , , it's NNS not RB too RB big JJ issue NN , , but CC anyway RB if IN there EX is VBZ some DT trick NN to TO use VV just RB single JJ data NNS buffer NN please VVP let VV me PP know VV , , I PP would MD prefer VV this DT way NN . SENT Logged VVN Multiplayer NN Online JJ Gameshttp NP . SENT www JJ . SENT duelboard NN . SENT com NN crazyc NN 94 CD n NN 00 CD b SYM Offline NN Posts VVZ . SENT 5 CD Re NP . SENT NIO NP beginners NNS corner NN . SENT Reply VV 3 CD on RP . SENT September NP 15 CD , , 2005 CD , , 08 CD . SENT 08 CD . SENT 19 CD pm NN Very JJ helpful JJ guide NN . SENT Makes VVZ NIO NP seem VV easier JJR than IN I PP thought VVD it PP was VBD . SENT Logged VVN Matlu NP n NN 00 CD b SYM Offline NN Posts VVZ . SENT 44 CD Hasta NP La NP Victoria NP Siempre NP . SENT Re NP . SENT NIO NP beginners NNS corner NN . SENT Reply VV 4 CD on RP . SENT September NP 24 CD , , 2005 CD , , 02 CD . SENT 26 CD . SENT 33 CD pm NN btw NNS do VVP you PP find VVP it PP useful JJ reasonable JJ that IN NIO NP writes VVZ non JJ fatal JJ messages NNS to TO stderr NP . SENT It PP writes VVZ a DT message NN each DT time NN a DT connection NN is VBZ broken VVN . SENT I PP was VBD used VVN to TO write VV all PDT my PP$ internal JJ error NN messages NNS to TO stderr VV and CC redirect VV its PP$ output NN to TO file VV . SENT Now RB it's NNS all RB polluted JJ with IN not RB very RB useful JJ messages NNS from IN NIO NP . SENT Is VBZ there RB a DT way NN to TO turn VV it PP off RP . SENT Logged VVN Multiplayer NN Online JJ Gameshttp NP . SENT www JJ . SENT duelboard NN . SENT com NN blahblahblahh NN Moderator NN JGO NP Ninja NP Online JJ Posts VVZ . SENT 4090 CD . SENT oO NP grexengine NN . SENT com NN Oo NP . SENT Re NP . SENT NIO NP beginners NNS corner NN . SENT Reply VV 5 CD on RP . SENT September NP 25 CD , , 2005 CD , , 03 CD . SENT 04 CD . SENT 01 CD am RB Quote VVP from IN . SENT Matlu NP on IN September NP 24 CD , , 2005 CD , , 02 CD . SENT 26 CD . SENT 33 CD pmbtw NNS do VVP you PP find VVP it PP useful JJ reasonable JJ that IN NIO NP writes VVZ non JJ fatal JJ messages NNS to TO stderr NP . SENT It PP writes VVZ a DT message NN each DT time NN a DT connection NN is VBZ broken VVN . SENT I PP was VBD used VVN to TO write VV all PDT my PP$ internal JJ error NN messages NNS to TO stderr VV and CC redirect VV its PP$ output NN to TO file VV . SENT Now RB it's NNS all RB polluted JJ with IN not RB very RB useful JJ messages NNS from IN NIO NP . SENT Is VBZ there RB a DT way NN to TO turn VV it PP off RP . SENT We're NN in IN the DT 21 CD st NP century NN now RB , , and CC stderr NP is VBZ a DT not RB very RB useful JJ hangover NN from IN the DT 1970 CD s PP . SENT Do VV all PDT your PP$ logging VVG through IN a DT logging VVG system NN , , and CC output NN to TO multiple JJ different JJ logs NNS in IN parallel NN . SENT Personally RB . SENT I PP haven't VVD worked VVN out RP how WRB to TO get VV the DT start NN stop NN daemon NN to TO redirect VV the DT JVM NP process's NP stderr NP to TO a DT file NN , , so RB I PP never RB even RB see VV stderr NNS from IN past JJ experience NN , , I PP believe VVP this DT is VBZ a DT bug NN in IN the DT JVM NP . SENT I've NN seen VVN several JJ process NN level NN bugs NNS in IN Sun's NP JVM NP over IN the DT past JJ few JJ years NNS where WRB it PP just RB wasn't VVD adhering VVG to TO the DT standards NNS properly RB , , or CC was VBD doing VVG odd JJ things NNS it PP shouldnt NN be VB doing VVG that IN caused VVN it PP to TO barf NN in IN quite PDT a DT lot NN of IN standard JJ linux NNS unix NP situations NNS e NN . SENT g NN . SENT it PP was VBD impossible JJ to TO run VV chroot'd NN . SENT That's NP pretty RB shocking JJ . SENT debian JJ thing NN that WDT converts VVZ any DT program NN into IN a DT service NN , , so RB that IN it PP is VBZ auto NN started VVN on IN bootup NN , , and CC can MD be VB controlled VVN centrally RB using VVG a DT script NN with IN start NN , , stop VV , , restart VV , , reload NN config NN , , etc FW all RB implemented VVN for IN you PP . SENT You PP just RB need VVP to TO provide VV a DT few JJ params NNS for IN your PP$ app NP . SENT In IN my PP$ case NN , , that's NNS the DT JVM NN a DT jar NN to TO tell VV it PP which WDT server NN to TO run VV . SENT . SENT . SENT Logged VVN The DT Java NP Games NPS Factory NP free JJ games NNS , , free JJ articles NNS , , and CC java NP developer NN tutorials NNS http NN . SENT javagamesfactory NN . SENT org NP blahblahblahh NP Moderator NN JGO NP Ninja NP Online JJ Posts VVZ . SENT 4090 CD . SENT oO NP grexengine NN . SENT com NN Oo NP . SENT Re NP . SENT NIO NP beginners NNS corner NN . SENT Reply VV 6 CD on RP . SENT September NP 25 CD , , 2005 CD , , 03 CD . SENT 15 CD . SENT 38 CD am RB Quote VVP from IN . SENT Matlu NP on IN July NP 23 CD , , 2005 CD , , 11 CD . SENT 59 CD . SENT 58 CD amThank NN you PP . SENT BTW JJ for IN some DT reason NN I'm NN not RB able JJ to TO run VV any DT game NN from IN that DT site NN . SENT It PP always RB says VVZ . SENT unable JJ to TO run VV specified JJ configuration NN I PP have VHP windows NNS XP NP with IN j NN 2 CD re NN 1 LS . SENT 4 LS . SENT 2 CD 08 CD I PP seriously RB hope VVP that's NNS fixed VVN by IN now RB . SENT QuoteI NP also RB have VHP one CD comment NN to TO that DT article NN please VV note NN that IN I'm NP total JJ NIO NP newbie NN , , so RB I PP may MD be VB totaly RB wrong JJ . SENT So RB . SENT I PP don't VVD understand VV some DT statements NNS , , basically RB you PP are VBP saying VVG . SENT With IN old JJ IO NP you PP have VHP to TO periodically RB poll VV EACH DT connection NN , , which WDT is VBZ evil JJ . SENT With IN NIO NP you PP don't VVD have VH to TO poll VV , , you PP just RB ask VV . SENT what's NNS ready JJ . SENT . SENT Again RB , , I PP don't VVD know VV how WRB exactly RB is VBZ NIO NP implemented VVN , , but CC doesn't VVD it PP have VHP to TO do VV exactly RB same JJ thing NN internally RB . SENT To TO poll VV EACH DT connection NN , , each DT time NN you PP call VVP Selector NN . SENT . SENT select VV . SENT Just RB deffering VVG what WP you PP would MD do VV with IN old JJ IO NP to TO some DT internal JJ library NN . SENT In IN worse JJR case NN it PP happens VVZ in IN some DT java NP library NN , , in IN better JJR case NN it PP happens VVZ in IN some DT native JJ library NN . SENT Can MD you PP imagine VV how WRB else RB it PP could MD be VB implemented VVN . SENT By IN what WP other JJ miracle NN it PP could MD learn VV which WDT sockets NNS have VHP some DT data NNS ready JJ to TO read VV . SENT At IN the DT hardware NN level NN , , when WRB something NN happens VVZ tehre's NNS an DT interrupt VV . SENT This DT interrupt VV allows VVZ the DT CPU NN to TO stop VV what WP it's NNS doing VVG and CC handle VV the DT interrupt VV . SENT Ultimately RB , , if IN the DT OS NN is VBZ coded VVN well RB and CC the DT libs NNS are VBP coded VVN well RB , , that IN interrupt VV can MD filter VV up RP to TO the DT thread NN that's NNS blocked VVN on IN select JJ without IN any DT polling NN at IN all DT . SENT Although IN , , IIRC NP , , Sun NP got VVD it PP wrong JJ with IN the DT first JJ 3 CD versions NNS of IN the DT linux NP NIO NP and CC hooked VVN into IN the DT crappy JJ linux NN asynch NN nb NN library NN . SENT Doh NN . SENT QuoteAaaand NP , , finaly RB I PP have VHP one CD more JJR question NN . SENT With IN old JJ IO NP I'm NP using VVG single JJ data NNS buffer VV well RB , , I PP mean VVP plain JJ byte NN array NN , , which WDT is VBZ re NN used VVN for IN all DT connections NNS . SENT If IN I PP have VHP 1000 CD connections NNS , , I PP just RB iterate VV them PP periodically RB calling VVG InputStream NP . SENT . SENT available JJ and CC if IN any DT of IN them PP has VHZ enough JJ data NNS I PP read VVP immediatelly RB process VV them PP . SENT Is VBZ it PP possible JJ to TO achieve VV it PP with IN NIO NP . SENT As RB far RB as IN I PP understand VVP , , you PP MUST MD have VH dedicated VVN ByteBuffer NP for IN EACH DT connection NN because IN you PP never RB know VVP in IN advance NN have VHP many JJ bytes NNS available JJ , , so RB you PP must MD be VB prepared VVN to TO read VV incomplete JJ messages NNS . SENT Well RB , , it's NNS not RB too RB big JJ issue NN , , but CC anyway RB if IN there EX is VBZ some DT trick NN to TO use VV just RB single JJ data NNS buffer NN please VVP let VV me PP know VV , , I PP would MD prefer VV this DT way NN . SENT There's RB no DT difference NN . SENT However RB , , what WP you're NN doing VVG is VBZ wrong JJ , , and CC buggy NN , , unless IN you PP can MD absolutely RB guarantee VV that IN all DT requests NNS will MD always RB fit VV within IN your PP$ buffer NN . SENT And CC even RB then RB you're NN relying VVG on IN your PP$ hardware NN in IN a DT way NN that IN you PP cannot NN safely RB do VVP . SENT Sooner RBR or CC later RBR you'll JJ get VV a DT broken JJ server NN that WDT confuses VVZ the DT heck NN out RP of IN you PP . SENT If IN your PP$ buffer NN is VBZ 1 CD kb NN , , and CC your PP$ requests NNS are VBP all RB 900 CD b SYM , , then RB it PP sounds VVZ OK JJ . SENT Except IN . SENT . SENT . SENT e SYM . SENT g NN . SENT if IN you PP get VVP a DT corrupted VVN request NN , , and CC aren't JJ sure RB where WRB the DT next JJ request NN starts VVZ stops NNS until IN you PP have VHP the DT whole JJ thing NN in IN the DT buffer NN , , you PP may MD get VV 899 CD b NN of IN request NN 1 CD which WDT you PP can't VVD dispose VV of IN yet RB and CC 101 CD b SYM of IN request NN 2 CD which WDT you PP are VBP not RB seeing VVG enough RB of IN to TO process NN . SENT Maybe RB your PP$ protocol NN has VHZ an DT explicit JJ start NN such JJ that IN if IN you PP get VVP a DT corrupted VVN request NN you PP can MD throw VV it PP away RB as RB soon RB as IN you PP see VVP the DT start NN of IN the DT next JJ request NN . SENT But RB . SENT . SENT . SENT where WRB do VVP you PP think VVP all PDT these DT incomplete JJ messages NNS sit VVP , , if IN not RB read VVN by IN your PP$ program NN . SENT Your PP$ ethernet NP card NN only RB has VHZ a DT limited JJ amount NN of IN on IN board NN buffer NN , , and CC your PP$ OS NN is VBZ only RB going VVG to TO buffer VV a DT limited JJ amount NN of IN that DT in IN memory NN for IN you PP OS NN dependent JJ . SENT Something's NNS got VVD to TO buffer VV it PP somewhere RB , , and CC NIC's NP usually RB have VHP only RB 32 CD kb NN of IN buffer NN not RB very RB much JJ . SENT . SENT So RB . SENT . SENT . SENT you PP might MD as RB well RB have VH a DT separate JJ input NN buffer NN for IN all DT incoming JJ connections NNS , , whehter NN you PP use VVP IO NP or CC NIO NP it PP ensures VVZ you PP never RB lose VVP data NNS because IN you're NN not RB taking VVG it PP out RP of IN the DT OS NN hardware NN buffers VVZ fast RB enough RB . SENT If IN you PP knew VVD more JJR about IN the DT OS NN and CC hardware NN , , you PP may MD be VB better JJR off RP not RB doing VVG . SENT But CC , , since IN NIO NP gives VVZ you PP no RB guarantees VVZ about IN that DT , , I PP don't VVD tend VV to TO bother VV . SENT Logged VVN The DT Java NP Games NPS Factory NP free JJ games NNS , , free JJ articles NNS , , and CC java NP developer NN tutorials NNS http NN . SENT javagamesfactory NN . SENT org NP Matlu NP n NN 00 CD b SYM Offline NN Posts VVZ . SENT 44 CD Hasta NP La NP Victoria NP Siempre NP . SENT Re NP . SENT NIO NP beginners NNS corner NN . SENT Reply VV 7 CD on RP . SENT September NP 26 CD , , 2005 CD , , 02 CD . SENT 55 CD . SENT 57 CD am RB QuoteHowever NP , , what WP you're NN doing VVG is VBZ wrong JJ , , and CC buggy NN , , unless IN you PP can MD absolutely RB guarantee VV that IN all DT requests NNS will MD always RB fit VV within IN your PP$ buffer NN . SENT yes UH , , that WDT was VBD the DT case NN . SENT The DT messages NNS had VHD limited VVN size NN and CC would MD always RB fit VV within IN the DT buffer NN . SENT Anyway RB , , it's NNS history NN . SENT Since IN I PP switched VVD to TO NIO NP I PP have VHP separated VVN buffer NN for IN each DT connection NN there EX is VBZ no DT other JJ possibility NN with IN NIO NP QuoteAt NP the DT hardware NN level NN , , when WRB something NN happens VVZ tehre's NNS an DT interrupt VV . SENT This DT interrupt VV allows VVZ the DT CPU NN to TO stop VV what WP it's NNS doing VVG and CC handle VV the DT interrupt VV . SENT Ultimately RB , , if IN the DT OS NN is VBZ coded VVN well RB and CC the DT libs NNS are VBP coded VVN well RB , , that IN interrupt VV can MD filter VV up RP to TO the DT thread NN that's NNS blocked VVN on IN select JJ without IN any DT polling NN at IN all DT . SENT Ok NP , , if IN it's NNS possible JJ to TO register VV socket NN observers NNS at IN operating VVG system NN level NN and CC jvm NN can MD be VB notified VVN without IN polling NN , , then RB . SENT . SENT . SENT it's NNS good JJ . SENT Logged VVN Multiplayer NN Online JJ Gameshttp NP . SENT www JJ . SENT duelboard NN . SENT com NN Pages NP . SENT 1 CD Jump NP to TO . SENT Java NP Games NPS Forums NNS A DT Java NP . SENT Net JJ Community NN Powered VVN by IN SMF NP 1 CD . SENT 0 CD . SENT 3 LS . SENT 2001 CD 2005 CD , , Lewis NP Media NP . SENT All DT Rights NP Reserved NP . SENT Apollo NP design NN by IN Bloc NP