Re: [xSocket-develop] A clerical error in the XScoket core tutorial
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2008-03-04 06:03:42
|
Wang, thanks for the report. The typo has been fixed. The tutorial has also been updated to cover the new beta-1 version. Gregor 2008/3/4, yud...@ns... <yud...@ns...>: > > Hi: > > I am a new user of XSocket, when I study the core > tutorial on > http://xsocket.sourceforge.net/core/tutorial/V2/TutorialCore.htm, in the > section â*7. Handling timeout's*â, the sample code is : > > // the handler > > class Handler implements IDataHandler, IIdleTimeoutHandler, > IConnectionTimeoutHandler { > > > > *public boolean onConnectionTimeout(INonBlockingConnection nbc) throws > IOException* { > > nbc.write("bye bye"); > > nbc.close(); > > > > return true; // prevent, that xSocket also closes the connection > > } > > > > > > *public boolean onConnectionTimeout(INonBlockingConnection nbc) throws > IOException* { > > nbc.write("What's going on? Why don't you send data?"); > > > > connection.setIdleTimeoutSec(30); // resets the timeout counter > > return true; // prevent, that xSocket closes the connection > > } > > > > > > public boolean onData(INonBlockingConnection nbc) throws IOException { > > ... > > > > return true; > > } > > } > > > > > > // and the server > > IServer server = new Server(8090, new Handler()); > > server.setIdleTimeoutSec(30); // set the default idle timeout for > server-side connections > > server.run(); > > > > > > These 2 function are same, but I think the second should be â *public* > *boolean* onIdleTimeout(INonBlockingConnection arg0)â, is it right? > > > > Thanks. > > > > Best regards > ======================= > Wang Yudong > 15882146156 > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > > |