Move docs around.

This commit is contained in:
barant committed 2020-06-11 18:54:51 -07:00
1 parent 63943e02dd
commit 3fee297136
2154 files changed
+19543 -41261

No files matched your search

+13 -5
View File
@@ -101,14 +101,22 @@ the BMATCPServerSocket or BMAUDPServerSocket, depending on the type
desired, and the BMASession object.
When extending the BMATCPServerSocket all that is needed is to
override the getSocketAccept() method to return an extended BMASession
override the getSocketAccept() method to return an extended TCPSession
object. This basically tells the server to spawn a new session of a
particular type for every new connection to the bound TCP port.
The extended BMASession object can override the onDataReceived()
method to handle the incoming requests for the socket. An entire
application structure could be built upon this mechanism to handle
complex protocols with the client.
Data received in the session can be delivered to the application
using two different modes. The LINE mode will call the onLineReceived()
handler for each line received in the buffer. The line termination can
be LF or CRLF combination and is filtered from the string handed to
the onLineReceived() method call. The BLOCK mode will call the
onBlockReceived() handler for each blockSize bytes received in the
data buffer.
The extended TCPSession object can override the onLineReceived()
and/or the onBlockReceived() methods to handle the incoming requests
for the socket. An entire application structure could be built upon
this mechanism to handle complex protocols with the client.
\chapter{Sample Server Example}