Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for libplaton/platon/net/connection.h between version 1.7 and 1.8

version 1.7, 2002/09/20 16:22:25 version 1.8, 2002/09/29 03:55:02
Line 1 
Line 1 
 /**************************************************************************  /**************************************************************************
  *                                                                        *   *                                                                        *
  *  No objects telnet protocol header file                                *   *  Net connection non-object routines                                    *
  *                                                                        *   *                                                                        *
  *  Programmed by Ondrej Jombik <nepto@pobox.sk>                          *   *  Programmed by Ondrej Jombik <nepto@pobox.sk>                          *
  *  Copyright (c) 2000 Condy software inc.                                *   *  Copyright (c) 2000 Condy software inc.                                *
Line 13 
Line 13 
  **************************************************************************/   **************************************************************************/
   
 /**  /**
  * @file        telnet/tn_noobj.h   * Net connection non-object routines
  * @brief       Telnet protocol non-object routines   *
    * @file        platon/net/connection.h
  * @author      Ondrej Jombik <nepto@pobox.sk>   * @author      Ondrej Jombik <nepto@pobox.sk>
  * @version     \$Id$   * @version     \$Id$
  * @date        2001-2002   * @date        2001-2002
  */   */
   
 #ifndef _PLATON_TELNET_TN_NOOBJ_H  #ifndef _PLATON_NET_CONNECTION_H
 #define _PLATON_TELNET_TN_NOOBJ_H  #define _PLATON_NET_CONNECTION_H
   
 /** End of line string. */  /** End of line string. */
 #ifndef TELNET_EOL  #ifndef NET_CONNECTION_EOL
 #  define TELNET_EOL "\r\n"  #  define NET_CONNECTION_EOL "\r\n"
 #endif  #endif
   
 /** Default telnet port */  /** Default telnet port */
 #ifndef TELNET_PORT  #ifndef NET_CONNECTION_PORT
 #  define TELNET_PORT 23  #  define NET_CONNECTION_PORT 23
 #endif  #endif
   
 /** Telnet stream mode */  /** Telnet stream mode */
 #ifndef TELNET_FMODE  #ifndef NET_CONNECTION_FMODE
 #  define TELNET_FMODE "rt+"  #  define NET_CONNECTION_FMODE "rt+"
 #endif  #endif
   
 /**  /**
Line 47 
Line 48 
  *   *
  * Note that ouput stream will be buffered.   * Note that ouput stream will be buffered.
  */   */
 #define telnet_fconnect(host,port) fdopen(telnet_connect(host,port), TELNET_FMODE)  #define net_connection_fconnect(host,port) \
   fdopen(net_connection_connect(host,port), NET_CONNECTION_FMODE)
   
 #ifdef __cplusplus  #ifdef __cplusplus
 extern "C" {  extern "C" {
Line 60  extern "C" {
Line 62  extern "C" {
          * @param       port            port           * @param       port            port
          * @return      telnet connection handle or -1 on error           * @return      telnet connection handle or -1 on error
          */           */
         int telnet_connect(const char*host,int port);          int net_connection_connect(const char*host,int port);
   
         /**          /**
          * Read data from connection           * Read data from connection
Line 70  extern "C" {
Line 72  extern "C" {
          * @param       size    buffer size           * @param       size    buffer size
          * @return      count of read bytes or negative value on connection lost           * @return      count of read bytes or negative value on connection lost
          */           */
         int telnet_read(int handle,char*buffer,int size);          int net_connection_read(int handle,char*buffer,int size);
   
         /**          /**
          * Read one line from connection           * Read one line from connection
Line 80  extern "C" {
Line 82  extern "C" {
          * @param       size    buffer size           * @param       size    buffer size
          * @return      count of read bytes or negative value on connection lost           * @return      count of read bytes or negative value on connection lost
          *           *
          * One line is character set terminated with @ref TELNET_EOL.           * One line is character set terminated with @ref NET_CONNECTION_EOL.
          */           */
         int telnet_gets(int handle,char*buffer,int size);          int net_connection_gets(int handle,char*buffer,int size);
   
 #ifdef __cplusplus  #ifdef __cplusplus
 }  }
 #endif  #endif
   
 #endif /* #ifndef _PLATON_TELNET_TN_NOOBJ_H */  #endif /* #ifndef _PLATON_NET_CONNECTION_H */
   

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top