U n i c o d e .   {SO-NeTJSR
 
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
   *                                                                                                                                                   * 
 
   *       E x p l i c i t   D i s t r i b u t i o n   D e c l a r a t i o n                                                                           * 
 
   *       T h i s   p r o g r a m   i s   n o t   w e l c o m e d   t o   b e   m o d i f i e d   o r   u s e d   b y ,   o r ,   i f                 * 
 
   *       p o s s i b l e ,   r e d i s t r i b u t e d   t o   p e o p l e   w h o   d i s c r i m i n a t e   a g a i n s t   p e o p l e           * 
 
   *       b a s e d   s o l e l y   o n   r a c e ,   g e n d e r   o r   s e x u a l   o r i e n t a t i o n .                                       * 
 
   *                                                                                                                                                   * 
 
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 
 
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
       C o p y r i g h t   2 0 1 0   A l l e n   T s e 
 
 
 
       L i c e n s e d   u n d e r   t h e   A p a c h e   L i c e n s e ,   V e r s i o n   2 . 0   ( t h e   " L i c e n s e " ) ; 
 
       y o u   m a y   n o t   u s e   t h i s   f i l e   e x c e p t   i n   c o m p l i a n c e   w i t h   t h e   L i c e n s e . 
 
       Y o u   m a y   o b t a i n   a   c o p y   o f   t h e   L i c e n s e   a t 
 
 
 
               h t t p : / / w w w . a p a c h e . o r g / l i c e n s e s / L I C E N S E - 2 . 0 
 
 
 
       U n l e s s   r e q u i r e d   b y   a p p l i c a b l e   l a w   o r   a g r e e d   t o   i n   w r i t i n g ,   s o f t w a r e 
 
       d i s t r i b u t e d   u n d e r   t h e   L i c e n s e   i s   d i s t r i b u t e d   o n   a n   " A S   I S "   B A S I S , 
 
       W I T H O U T   W A R R A N T I E S   O R   C O N D I T I O N S   O F   A N Y   K I N D ,   e i t h e r   e x p r e s s   o r   i m p l i e d . 
 
       S e e   t h e   L i c e n s e   f o r   t h e   s p e c i f i c   l a n g u a g e   g o v e r n i n g   p e r m i s s i o n s   a n d 
 
       l i m i t a t i o n s   u n d e r   t h e   L i c e n s e . 
 
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 
 
 
 
 < G e n e r a l   d e s c r i p t i o n > 
 
 
 
     E Z   C o m m   i s   a n   e a s y   T C P / U D P   c o m m u n i c a t i o n   t o o l   d i s p l a y i n g   e v e r y t h i n g   i t 
 
 r e c e i v e s   a n d   s e n d i n g   e v e r y t h i n g   y o u   i n p u t .   O n l y   g r a p h i c a l   i n t e r f a c e 
 
 s u p p o r t e d   s o   f a r .   I f   s o u r c e   c o d e   i s   d o w n l o a d e d   a n d   y o u   w a n t   t o   b u i l d   t h e 
 
 a p p l i c a t i o n   y o u r s e l f ,   U l t i m a t e + +   i s   n e e d e d .   T h o u g h   t h e   i n t e r f a c e 
 
 f u n c t i o n a l i t i e s   a r e   b u i l t   u p o n   U l t i m a t e + + ,   t h e   c o r e   f u n c t i o n a l i t i e s   a r e 
 
 n o t ,   t h u s   c a n   b e   b u i l t   s e p a r a t e l y   ( a s   a   l i b r a r y   i n   t h e   f u t u r e )   o n   e i t h e r 
 
 W i n d o w s   o r   L i n u x ( P O S I X ) . 
 
 
 
 < S i m l e   u s a g e s > 
 
 
 
     T h e   i n t e r f a c e   i s   s p l i t   i n t o   t w o   p a r t s ,   l o c a l   a n d   r e m o t e .   I f   n o   l o c a l 
 
 a d d r e s s   i s   i n p u t ,   a l l   i n t e r f a c e s   a r e   t r i e d .   I f   n o   l o c a l   p o r t   i s   i n p u t , 
 
 a   v a l i d   o n e   i s   a u t o m a t i c a l l y   c h o s e n .   I f   l i s t e n i n g   i s   r e q u e s t e d ,   r e m o t e 
 
 a d d r e s s   a n d   p o r t   a r e   n o t   n e e d e d   t o   b e   p r o v i d e d .   W h e n   a n   a c t i o n   i s   r e q u e s t e d 
 
 w i t h o u t   n e c e s s a r y   i n f o r m a t i o n ,   s u c h   a s   a d d r e s s   o r   p o r t ,   c o r r e s p o n d i n g 
 
 i n p u t   f i e l d s   w i l l   b e   m a r k e d   o u t . 
 
     I f   a n   a d d r e s s   f r e q u e n t l y   s e n d s   d a t a   t o   a n o t h e r   a d d r e s s   w i t h i n   a   p e r i o d ,   i t 
 
 m a y   b e   f l o o d i n g   o r   a t t a c k i n g .   W h e n   a n t i - f l o o d   i s   e n a b l e d ,   t h e   l e n g t h   o f   t h i s 
 
 p e r i o d   a n d   t h e   n u m b e r   o f   m e s s a g e s   t h a t   t r i g g e r s   t h i s   f u n c t i o n   c a n   b o t h   b e 
 
 c o n f i g u r e d .   T h e   f l o o d i n g   p a r t y   w i l l   b e   d i s c o n n e c t e d   a n d   i t s   a d d r e s s   w i l l   b e 
 
 a d d e d   t o   b l a c k l i s t ,   s o   t h a t   w i t h i n   s o m e   t i m e   ( t h e   l e n g t h   o f   t h i s   p e r i o d   c a n 
 
 b e   c o n f i g u r e d ,   t o o )   i t   w i l l   s t i l l   b e   b l o c k e d . 
 
 
 
 < F i l e s   u s e d > 
 
 
 
     L o g g i n g   c a n   b e   e n a b l e d .   A   l o g   f i l e   i s   a n   X M L   f i l e ,   v e r s i o n e d   1 . 0 .   T h e   r o o t 
 
 e l e m e n t   i s   E Z _ C o m m   a n d   t h e   f i l e ' s   t y p e ,   p r o g r a m ' s   v e r s i o n   a n d   l i n k   a r e   t h e 
 
 e l e m e n t ' s   a t t r i b u t e s .   T y p e ' s   v a l u e   i s   l o g   ( d e s c r i b e d   i n   t h i s   p a r a g r a p h ) ,   b a t 
 
 ( a u t o m a t i c   m o d e   g u i d e   f i l e ,   d e s c r i b e d   l a t e r )   o r   c f g   ( d e s c r i b e d   i n   t h e   n e x t 
 
 p a r a g r a p h ) .   I n f o r m a t i o n   i s   a d d e d   a s   o t h e r   e l e m e n t s   a n d   s y s t e m ' s   t i m e   w i l l   b e 
 
 t h e i r   a t t r i b u t e s . 
 
 
 
     E Z   C o m m   u s e s   c o n f i g u r a t i o n   f i l e   e z c o m m . x m l   u n d e r   c u r r e n t   d i r e c t o r y .   I f   i t 
 
 i s   a b s e n t ,   i t   i s   r e g a r d e d   a s   t h e   f i r s t   t i m e   r u n n i n g   a n d   t h e   f i l e   w i l l   b e 
 
 c r e a t e d .   I f   a   f i l e   w i t h   s a m e   n a m e   b u t   i n v a l i d   f o r m a t   e x i s t s ,   E Z   C o m m   w i l l 
 
 t r y   t o   r e n a m e   i t   w i t h   a   n u m b e r .   T h e   f i l e ' s   f o r m a t   i s   s i m i l a r   t o   a   l o g   f i l e , 
 
 e x c e p t   t h a t   t h e   t y p e ' s   v a l u e   m u s t   b e   c f g .   T h e   p r o g r a m   v e r s i o n   a n d   l i n k 
 
 a t t r i b u t e s   o f   t h e   r o o t   e l e m e n t   a r e   o p t i o n a l .   I f   i t   i s   t h e   f i r s t   t i m e   r u n n i n g , 
 
 E Z   C o m m   s h o w s   w i z a r d   w i n d o w . 
 
     W i z a r d   w i n d o w   s h o w s   w o r d s   t o   h e l p   u s e r   s t e p   b y   s t e p .   I t   c a n   b e   c l o s e d 
 
 a n y t i m e   a n d   s h o w n   b y   c h o o s i n g   t o   i n   H e l p   w i n d o w .   I f   w i z a r d   w i n d o w   i s   s h o w n 
 
 w h e n   E Z   C o m m   s h u t s   d o w n ,   t h e   n e x t   t i m e   i t   w i l l   b e   s h o w n ,   t o o .   T h i s   i s   a n 
 
 e l e m e n t   i n   t h e   c o n f i g u a t i o n   f i l e .   T h e   e l e m e n t ' s   n a m e   i s   w i z a r d . 
 
     U s e r   c a n   s w i t c h   l a n g u a g e   i n   L a n g u a g e 
   w i n d o w .   I t   h a s   e f f e c t   i n s t a n t l y . 
 
 D e f a u l t   l a n g u a g e 
   i s   t h e   s y s t e m ' s   l a n g u a g e .   I f   s w i t c h e d ,   i t   w i l l   b e   s t o r e d 
 
 i n   t h e   c o n f i g u r a t i o n   f i l e ,   i n   e l e m e n t   l a n g u a g e . 
 
 
 
 < R u n n i n g   m o d e s > 
 
 
 
     T h r e e   m o d e s   a r e   s u p p o r t e d ,   k e y b o a r d ,   f i l e   a n d   a u t o m a t i c   m o d e .   A u t o m a t i c 
 
 m o d e   i s   u n d e r   c o n s t r u c t i o n . 
 
     I n   k e y b o a r d   m o d e ,   w h a t   u s e r   i n p u t   i s   s e n t   d i r e c t l y   i n   A S C I I . 
 
     I n   f i l e   m o d e ,   u s e r   c h o o s e s   a   f i l e   t o   s e n d .   A n   A S C I I   1   i s   t h e   f i r s t   b y t e   i n 
 
 t h e   o u t g o i n g   b u f f e r .   T h e n   c o m e s   t h e   f i l e   n a m e ,   p a c k e t   n u m b e r   a n d   f i l e   c o n t e n t 
 
 l e n g t h ,   a l l   i n   s e p a r a t e   a n g l e   b r a c k e t s .   A n d   a f t e r   t h a t ,   t h e   f i l e ' s   c o n t e n t   i s 
 
 a p p e n d e d .   W h e n   a   f i l e   i s   r e c e i v e d   i n   t h i s   m o d e ,   u s e r   i s   p r o m p t e d   t o   s a v e   i t   o r 
 
 d i s c a r d   i t .   O n l y   a f t e r   a   f o r m e r   i n c o m i n g   f i l e   i s   d e a l t   w i t h   w i l l   a n o t h e r   f i l e 
 
 b e   p r o m p t e d . 
 
     I n   a u t o m a t i c   m o d e ,   a   b a t c h   f i l e   i s   n e e d e d   s o   t h a t   t h i s   p r o g r a m   c a n   w o r k   o n 
 
 i t s   o w n .   R e f e r   t o   l o g   f i l e   f o r m a t   f o r   g e n e r a l   i n f o r m a t i o n   e x c e p t   t h a t   t h e 
 
 t y p e ' s   v a l u e   m u s t   b e   b a t .   T h e   r o o t   e l e m e n t   c a n   h a v e   a n   o p t i o n a l   a t t r i b u t e   t o 
 
 s a v e   l o g   f i l e .   I t s   n a m e   i s   l o g   a n d   i t s   v a l u e   i s   t h e   f i l e ' s   n a m e .   T h e   p r o g r a m 
 
 v e r s i o n   a n d   l i n k   a t t r i b u t e s   a r e   o p t i o n a l . 
 
         A l l   n o d e s   c a n   h a v e   a t t r i b u t e   b o o k m a r k ,   w h o s e   v a l u e   s h o u l d   b e 
 
 u n i q u e   a c r o s s   t h e   f i l e ,   t o   m a r k   a   p o s i t i o n   i n   t h e   p r o c e d u r e . 
 
         E l e m e n t s   w i t h   t h e   n a m e s   i n   t h e   t a b l e   b e l o w   a r e   p r o c e s s e d .   T h e s e   e l e m e n t s 
 
 a r e   r e f e r r e d   t o   a s   a c t i o n   n o d e s .   I f   a n d   o n l y   i f   a n   a c t i o n ' s   r e s u l t   i s   s u c c e s s f u l   ( r e f e r 
 
 t o   i f   d e s c r i p t i o n   i n   t h e   t a b l e   b e l o w ) ,   i t s   s u b - n o d e s   w i l l   b e   p r o c e s s e d .   N o t e 
 
 t h a t   t h o u g h   s o m e   a t t r i b u t e   v a l u e s   a r e   i g n o r e d ,   t h e y   m u s t   b e   p r o v i d e d   a c c o r d i n g 
 
 t o   X M L   f o r m a t . 
 
 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
 |   n o d e   n a m e     |   a t t r i b u t e   o r   B O D Y                           |   r e s u l t   ( o r   v a r i a b l e   R E S U L T )       | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   c o m p u t e         |   * g e t   -   v a r i a b l e   n a m e .   T h a t         |   A   v a r i a b l e   n a m e   f o l l o w e d   b y       | 
 
 |                         |     v a r i a b l e ' s   v a l u e   w i l l   b e           |     a   n u m b e r ,   s t r i n g ,   b o o l e a n ,       | 
 
 |                         |     u s e d   a s   a n   o p e r a n d .                     |     o r   a n o t h e r   v a r i a b l e   n a m e ,         | 
 
 |                         |   * n u m b e r   -   v a r i a b l e   n a m e   w h e n     |     c a n   s e t   t h e   l e f t   o p e r a n d .         | 
 
 |                         |     s e t t i n g   a n   n u m b e r .                       |   C o n v e r t i n g   a n   n u m b e r   t o   o r         | 
 
 |                         |   * s t r i n g   -   v a r i a b l e   n a m e   w h e n     |     f r o m   a   s t r i n g   i s   a l l o w e d .         | 
 
 |                         |     s e t t i n g   a   s t r i n g .                         |   R T T P _ R G H T   -   s u c c e e d e d                   | 
 
 |                         |   * b o o l e a n   -   v a r i a b l e   n a m e   w h e n   |   R T T P _ M N E R   -   d a t a   t y p e s                 | 
 
 |                         |     s e t t i n g   a   b o o l e a n .                       |     m i s m a t c h                                           | 
 
 |                         |   * o p e r a t o r   -   o n e   o f   o p e r a t o r s ,   |   R T T P _ C R E R   -   i n c o m p l e t e                 | 
 
 |                         |     + ,   - ,   * ,   /   f o r   i n t e g e r s .   O n e   |     a t t r i b u t e s                                       | 
 
 |                         |     o f   o p e r a t o r s ,   a p p e n d ,   f i n d ,     |   V a r i a b l e   V A L U E   s t o r e s   f i n a l       | 
 
 |                         |     l e n g t h ,   r e m o v e   f o r   s t r i n g s .     |     r e s u l t   w h e n   n o t   s e t t i n g   a         | 
 
 |                         |   ( A t t r i b u t e s   b e l o w   c a n n o t   b e       |     v a r i a b l e .   T h e   r e s u l t s   o f           | 
 
 |                         |     o p e r a n d s . )                                       |     f i n d   a n d   l e n g t h   a r e   n u m b e r s .   | 
 
 |                         |   * t i m e   -   t o   g e t   c u r r e n t   t i m e       |     r e m o v e   s e t s   n o   r e s u l t .               | 
 
 |                         |                                                               |   V a r i a b l e   V A L U E   s t o r e s   c u r r e n t   | 
 
 |                         |   * t i c k   -   t o   g e t   c u r r e n t   s y s t e m   |     d a t e   a n d   t i m e .                               | 
 
 |                         |     t i c k                                                   |   V a r i a b l e   V A L U E   s t o r e s   c u r r e n t   | 
 
 |                         |                                                               |     s y s t e m   t i c k .                                   | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   i f                   |   * g e t ,   i n t e g e r ,   s t r i n g ,   o r           |   B o o l e a n s   a r e   c h e c k e d   a g a i n s t     | 
 
 |                         |     b o o l e a n   -   s a m e   a s   i n   c o m p u t e   |     T R U E .   N u m b e r s   a r e   c h e c k e d         | 
 
 |                         |   * o p e r a t o r   -   o n e   o f   o p e r a t o r s ,   |   a g a i n s t   n o n - z e r o .   R e f e r   t o         | 
 
 |                         |     < ,   > ,   < = ,   > =   f o r   i n t e g e r s         |   c o m m e n t s   a f t e r   t h i s   t a b l e   f o r   | 
 
 |                         |     ( d e f a u l t   i s   e q u a l i t y   t e s t )       |   s t r i n g s .                                             | 
 
 |                         |   * o p e r a t o r   -   ~ = ,   t o   c o m p a r e         |   I f   n o   o p e r a t o r s   p r o v i d e d ,           | 
 
 |                         |     s t r i n g s ,   c a s e   i n s e n s i t i v e         |     l a s t   R E S U L T   w i l l   b e   u s e d .         | 
 
 |                         |     ( d e f a u l t   i s   c a s e   s e n s i t i v e )     |   I f   r e s u l t   i s   T R U E ,   s u b - n o d e s     | 
 
 |                         |                                                               |     a r e   p r o c e s s e d .   O t h e r w i s e           | 
 
 |                         |                                                               |     n o t .   n o   R E S U L T   i s   s e t .               | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   e l s e               |   ( S a m e   a s   i f )                                     |   ( S a m e   a s   i f ,   e x c e p t   t h a t   t h e     | 
 
 |                         |                                                               |     r e s u l t   i s   c h e c k e d   a g a i n s t         | 
 
 |                         |                                                               |     F A L S E . )                                             | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   f l o w               |   * l o o p   -   n u m b e r   o f   l o o p s   t h a t     |   ( N o   r e s u l t .   S u b - n o d e s   s h o u l d     | 
 
 |                         |     t h e   s u b - n o d e s   w i l l   b e                 |     b e   t h e   p r o c e d u r e s   t o   l o o p         | 
 
 |                         |     p r o c e s s e d .                                       |     i n   t h e   c a s e   o f   l o o p .   O t h e r       | 
 
 |                         |   * g o t o   -   b o o k m a r k   t o   g o   t o .         |     O t h e r   u s a g e s   n e g l e c t                   | 
 
 |                         |   ( D e f a u l t   i s   t o   g o   o u t   o f             |     s u b - n o d e s . )                                     | 
 
 |                         |     c u r r e n t   l o o p . )                               |                                                               | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   i n t e r a c t       |   * p r o c e d u r e   -   c o m m a n d   l i n e   t o     |   V a r i a b l e   V A L U E   s t o r e s   t h e           | 
 
 |                         |     e n v o k e .   V a l u e s   o r   g e t   c a n         |     c o m m a n d ' s   r e t u r n   v a l u e .             | 
 
 |                         |     b e   a f t e r   t h i s   t o   a p p e n d             |                                                               | 
 
 |                         |     p a r a m e t e r s .                                     |                                                               | 
 
 |                         |   * g e t ,   i n t e g e r ,   s t r i n g ,   o r           |                                                               | 
 
 |                         |     b o o l e a n   -   t o   a p p e n d                     |                                                               | 
 
 |                         |     c h a r a c t e r s   t o   t h e   c o m m a n d         |                                                               | 
 
 |                         |     l i n e .   M u l t i p l e   s e t t i n g s             |                                                               | 
 
 |                         |     s u p p o r t e d .                                       |                                                               | 
 
 |                         |   ( A t t r i b u t e s   b e l o w   c a n n o t   b e       |                                                               | 
 
 |                         |     u s e d   w i t h   p r o c e d u r e .   A n d   t h e   |                                                               | 
 
 |                         |     o n e s   e x c e p t   w a i t   c a n n o t   b e       |                                                               | 
 
 |                         |     u s e d   w i t h   t h e   o n e s   e x c e p t         |                                                               | 
 
 |                         |     w a i t ,   a m o n g   f o l l o w i n g                 |                                                               | 
 
 |                         |     a t t r i b u t e s . )                                   |                                                               | 
 
 |                         |   * f i l e   -   f i l e   n a m e   i f   a   f i l e       |   R T T P _ R G H T   -   d a t a   o r   f i l e             | 
 
 |                         |     i s   a n t i c i p a t e d   ( E Z   C o m m             |     r e c e i v e d .   I f   a   f i l e   i s               | 
 
 |                         |     f o r m a t ) .   B l a n k   w i l l   s a v e           |     r e c e i v e d ,   v a r i a b l e   F I L E             | 
 
 |                         |     o r i g i n a l   f i l e   n a m e   u n d e r           |     s t o r e s   i t s   n a m e .   O t h e r w i s e ,     | 
 
 |                         |     r u n n i n g   d i r e c t o r y .                       |     v a r i a b l e   D A T A   s t o r e s   d a t a .       | 
 
 |                         |   * d a t a   -   i f   s o m e   d a t a   i s               |   R T T P _ C R E R   -   f a i l e d   s u c h   a s         | 
 
 |                         |     a n t i c i p a t e d .   V a l u e   i g n o r e d .     |     i n s u f f i c i e n t   m e m o r y                     | 
 
 |                         |   * a u t o   -   i f   a   f i l e   o r   s o m e           |                                                               | 
 
 |                         |     d a t a   i s   a n t i c i p a t e d ,   d e c i d e d   |                                                               | 
 
 |                         |     a c c o r d i n g   t o   E Z   C o m m   f o r m a t ,   |                                                               | 
 
 |                         |     i . e . ,   A S C I I   1   a s   f i r s t   b y t e .   |                                                               | 
 
 |                         |     V a l u e   i g n o r e d .                               |                                                               | 
 
 |                         |   * w a i t   -   i n   s e c o n d s .   i f                 |   R T T P _ N O E R   -   t i m e o u t                       | 
 
 |                         |     n e g a t i v e ,   t h i s   t i m i n g   w i l l       |                                                               | 
 
 |                         |     n o t   b e   s t o p p e d   b y   a n                   |                                                               | 
 
 |                         |     i n c o m i n g   p a c k e t .   A t t r i b u t e s     |                                                               | 
 
 |                         |     a f t e r   t h i s   a r e   n e g l e c t e d .         |                                                               | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   l o g                 |   * g e t   o r   s t r i n g   -   t o   a p p e n d         |                                                               | 
 
 |                         |     c h a r a c t e r s   t o   l o g g i n g   a s           |                                                               |   
 
 |                         |     t e x t ,   i f   l o g g i n g   i s   e n a b l e d .   |                                                               | 
 
 |                         |   * r a w   -   i f   t h e   c h a r a c t e r s   n e e d   |                                                               | 
 
 |                         |     t o   b e   s t o r e d   a s   C D A T A .               |                                                               | 
 
 |                         |   * B O D Y   -   m o r e   t e x t   l o g g i n g .         |                                                               | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   l i s t e n           |   * l a d d r e s s   -   l o c a l   a d d r e s s           |   R T T P _ R G H T   -   s u c c e e d e d                   | 
 
 |                         |   * l p o r t   -   l o c a l   p o r t                       |   R T T P _ N O E R   -   a l r e a d y   l i s t e n i n g   | 
 
 |                         |   * m e t h o d   =   T C P   o r   U D P ( d e f a u l t )   |   R T T P _ M N E R   -   f a i l e d   s u c h   a s         | 
 
 |                         |   c o n n e c t e d   -   b o o k m a r k   t o   g o   t o   |     b i n d i n g   f a i l e d                               | 
 
 |                         |     w h e n   a   c l i e n t   c o n n e c t e d             |   R T T P _ C R E R   -   f a i l e d   s u c h   a s         | 
 
 |                         |   d i s c o n n e c t e d   -   b o o k m a r k   t o   g o   |     i n s u f f i c i e n t   m e m o r y                     | 
 
 |                         |     t o   w h e n   d i s c o n n e c t e d                   |                                                               | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   c o n n e c t         |   ( s a m e   a s   l i s t e n ,   p l u s )                 |   ( s a m e   a s   l i s t e n ,   p l u s )                 | 
 
 |                         |   r a d d r e s s   -   r e m o t e   a d d r e s s           |   I f   s u c c e e d e d ,   v a r i a b l e                 | 
 
 |                         |   r p o r t   -   r e m o t e   p o r t                       |     S E S S I O N   s t o r e s   s e s s i o n   I D .       | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   s e n d               |   * r a d d r e s s   -   r e m o t e   a d d r e s s         |   R T T P _ R G H T   -   s u c c e e d e d                   | 
 
 |                         |     f o r   U D P                                             |   R T T P _ M N E R   -   i f   f a i l e d   s u c h   n o   | 
 
 |                         |   * r p o r t   -   r e m o t e   p o r t   f o r   U D P     |     c o r r e s p o n d i n g   s e s s i o n   I D           | 
 
 |                         |   s e s s i o n   -   s e s s i o n   I D   f o r   T C P     |   R T T P _ C R E R   -   f a i l e d   s u c h   a s         | 
 
 |                         |   * f i l e   -   f i l e   n a m e   i f   a   f i l e       |     i n s u f f i c i e n t   m e m o r y                     | 
 
 |                         |     i s   t o   b e   s e n t                                 |                                                               | 
 
 |                         |   * B O D Y ( d e f a u l t   i s   z e r o   l e n g t h )   |                                                               | 
 
 |                         |     -   t e x t   i f   i t   i s   t o   b e   s e n t       |                                                               | 
 
 | - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 
 
 |   d i s c o n n e c t   |   * s e s s i o n   -   s e s s i o n   I D   f o r   T C P   |   R T T P _ R G H T   -   s u c c e e d e d                   | 
 
 |                         |     ( d e f a u l t   i s   a l l   s e s s i o n s )         |   R T T P _ M N E R   -   i f   f a i l e d   s u c h   a s   | 
 
 |                         |                                                               |     n o   c o r r e s p o n d i n g   s e s s i o n   I D     | 
 
 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
     *   =   o p t i o n a l . 
 
     O n c e   c o n n e c t e d ,   i t   c a n n o t   l i s t e n   o r   c o n n e c t   b e f o r e   d i s c o n n e c t i o n . 
 
     A l l   i n c o m i n g   c o n n e c t i o n   r e q u e s t s   a n d   p a c k e t   a r e   d i s c a r d e d   i f   n o t   m e n t i o n e d 
 
 t o   r e c e i v e   i n   i n t e r a c t . 
 
     N u m b e r s   a r e   s t o r e d   i n   t h e   t y p e   o f   d o u b l e . 
 
     B o o l e a n s   a r e   e i t h e r   T R U E   o r   F A L S E . 
 
     N o r m a l   s t r i n g s   a r e   c h e c k e d   a g a i n s t   n o n - e m p t y .   T h e   r e t u r n e d   v a l u e s   R T T P _ R G H T , 
 
 R T T P _ N O E R ,   R T T P _ M N E R ,   R T T P _ C R E R ,   a r e   s p e c i a l   s t r i n g s .   T h e i r   v a l u e s   c a n   b e 
 
 c h e c k e d   w i t h   n u m b e r s ,   e q u a l i n g   t o   4   t o   1 ,   r e s p e c t i v e l y .   A n d   t h e   f o r m e r   t w o   c a n 
 
 b e   r e g a r d e d   a s   b o o l e a n   T R U E ,   w h i l e   t h e   l a t t e r   t w o   a s   F A L S E ,   w h e n   b e i n g 
 
 c h e c k e d .   O p e r a t o r s   a p p e n d   a n d   f i n d   n e e d s   b o t h   l e f t   a n d   r i g h t   o p e r a n d s   t o   b e 
 
 s t r i n g s .   T h e   r i g h t   o p e r a n d   i s   a p p e n d e d   t o   t h e   l e f t   o r   s e a r c h e d   w i t h i n   t h e   l e f t 
 
 r e s p e c t i v e l y .   O p e r a n d   r e m o v e   n e e d s   l e f t   o p e r a n d   t o   b e   a   s t r i n g   a n d 
 
 r i g h t   o p e r a n d   t o   b e   a   n u m b e r ,   w h i c h   i n d i c a t e s   t h e   n u m b e r   o f   c h a r a c t e r s   t o   b e 
 
 r e m o v e d   f r o m   t h e   s t r i n g ' s   b e g i n n i n g   a n d   n e g a t i v e   n u m b e r s   m e a n   t h e   r e m o v a l 
 
 o c c u r s   a t   i t s   e n d .   O p e r a n d   l e n g t h   n e e d s   l e f t   o p e r a n d   t o   b e   a   s t r i n g   a n d   h a s 
 
 n o   r i g h t   o p e r a n d . 
 
 
 
                                                                                                                                       A l l e n   T s e 
 
                                                                                                                                 N o v .   9 ,   2 0 1 0 
 
 
 
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
   *                                                                                                                                                   * 
 
   *       fnxS^Xf                                                                                                                    * 
 
   *       ,gz^
N"kΏ[N	gye0'`+Rb'`STgkƉvNXO9e0O(uNYg            * 
 
   *       Sv݋_N
N[TvQ Od0                                                                                            * 
 
   *                                                                                                                                                   * 
 
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 
 
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
       HrCg  2 0 1 0   A l l e n   T s e 
 
 
 
       ,geNNt h e   A p a c h e   L i c e n s e ,   V e r s i o n   2 . 0 NN{ycCg	cCgNN-Neы
 
       v^^[eыNOShINNeSe:NQ	0
 
       `
NYN
Nu[cCgve_O(ueN0
 
       `SNSNNNN0W@W_0RcCgvb
 
 
 
               h t t p : / / w w w . a p a c h e . o r g / l i c e n s e s / L I C E N S E - 2 . 0 
 
 
 
       d^Qf1uNgbLl_bbTav NcCgS^voNWN ,gb__ e
 
       >f_b_l	gNUOb__vObagN0cCg-NsQNyr[ vSTP6R
 
       cCgSe0
 
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 
 
 
 
 < i> 
 
         fO/f N*N{USvT C P / U D P O]wQ0[SN>f:y6e0RvT`eQv^Sve,g0
 
 s(W؏S/ecVb_Lub0YgN}nx]ыR O(uU l t i m a t e + + 0}6qLub
 
 R/f(uU l t i m a t e + + ^zvFO/ffOv8h_RRR
N/f@bNSNUSr(W
 
 W i n d o w s bL i n u x ( P O S I X ) 
NыNTO\O:N^	0
 
 
 
 < {fO(u> 
 
 
 
         LubR:N,g0WT[z$NR0Yg
NQ,g0W0W@WR~[@b	g0W@WYg
NQ
 
 ,g0WzSRꁨR	b N*NS(uv0S_Bl v,T e
N_kXQ܏zI P TzS0(W
 
 BlۏLg*NR\O*gcO_Oo`Y0W@WbzSe[^veQFhOh:yQeg0
 
         Yg N*N0W@W(W NkeQA~T[eSpencR	gS/fQ~;eQ0S_Sb _
 
 2bk;eQReYeQ6e0RY\mo`/fSNMnv0(W;eQeOe _N
 
 ُ*N0W@WvON\vQ>eeQў
TUS(W Nkeُ*New_N/fSMv	Q
 
 N6qO\=[0
 
 
 
 < O(uveN> 
 
 
 
         SNU_e_0e_eNv<h_/fx m l   1 . 0 Hr,g09hCQ }/fE Z _ C o m m vQ^\'`	g
 
 eNv{|W0z^vHr,gTQ@W0{|WSN/fl o g ,gkc	0b a t ꁨR!j_c
 
 WSeNTbc	bc f g Nkc	0Oo`\O:NvQ[CQ }mR|~eO\O
 
 :NvQ^\'`0
 
 
 
         fOO(uS_MRvU_NvMneNe z c o m m . x m l 0Yg
NX[(WR:N/f,{ N!k
 
 ЏLub勇eN0Yg	gT
TeNFO
N/fSv<h_ROՋV\vQN&^
N N
 
 *NpeW[vb__ۏL͑}T
T0eN<h_Ne_eN<h_{|<O
NǏ{|W^/fc f g 0
 
 z^Hr,gTQ@WSN\O:N9hCQ }^\'`_NSNl	g0Yg/f,{ N!kЏLO>f:yR
 
 KbzS0
 
         RKbzS_[(u7bekd\OeSNsQ0sQTǏ.^RzSSNQ>f
 
 :y0Ygz^ QeRKbzS؏ _@wRN!k/TRTRKbzS؏O>f:y0ُ/fMn
 
 eN-Nvw i z a r d CQ }0
 
         (u7bǏ zSSNRbcLub 0MnsSeuHe0؞:N|~ 0R
 
 bcTOX[NMneN-Nvl a n g u a g e CQ }0
 
 
 
 < ЏL!j_> 
 
 
 
         /ec	Ny!j_.v0eNTꁨR0ꁨR!j_؏(W _S-N0
 
         (W.v!j_(u7beQveW[NA S C I I vcS0
 
         (WeN!j_(u7b	bSveN0A S C I I x1 MONSQv,{ N*NW[6qT
 
 /feN
T0S^STeN^k*Nb(W\bS-N0dkT/feNQ[0dk!j_Nc
 
 6e0R N*NeNeOc:y(u7b	bOX[b"N_0S	gHQ6e0RveNYtNKNTT6e0R
 
 veNMbONuc:y0
 
         (WꁨR!j_  N*NybYteNOz^SN]ЏL0eN<h_Se_eNv
 
 ;`SOcS/f{|WS<P^/fb a t 09hCQ }	gS	^\'`c[e_eN
Ty:Nl o g S
 
 <P:NeN
T0z^Hr,gTQ@W^\'`/fS	v0
 
                                                                                                                                             "Zlb
 
                                                                                                                     N% N%t^AS Ng]Ne
 
 