~ubuntu-branches/ubuntu/wily/afnix/wily

« back to all changes in this revision

Viewing changes to src/mod/net/shl/TcpSocket.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2011-03-16 21:31:18 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110316213118-gk4k3ez3e5d2huna
Tags: 2.0.0-1
* QA upload.
* New upstream release
* Debian source format is 3.0 (quilt)
* Fix debhelper-but-no-misc-depends
* Fix ancient-standards-version
* Fix package-contains-linda-override
* debhelper compatibility is 7
* Fix dh-clean-k-is-deprecated

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
// - the copyright holder be liable for any  direct, indirect, incidental or -
12
12
// - special damages arising in any way out of the use of this software.     -
13
13
// ---------------------------------------------------------------------------
14
 
// - copyright (c) 1999-2007 amaury darsch                                   -
 
14
// - copyright (c) 1999-2011 amaury darsch                                   -
15
15
// ---------------------------------------------------------------------------
16
16
 
17
17
#ifndef  AFNIX_TCPSOCKET_HPP
46
46
    /// @return the class name
47
47
    String repr (void) const;
48
48
 
 
49
    /// @return true if we are at the eos
 
50
    bool iseos (void) const;
 
51
    
 
52
    /// check if we can read one character
 
53
    bool valid (void) const;
 
54
 
49
55
    /// @return the next available character
50
56
    char read (void);
51
57
 
 
58
    /// copy the tcp socket into a buffer
 
59
    /// @param rbuf the reference buffer
 
60
    /// @param size the buffer size
 
61
    long copy (char* rbuf, const long size);
 
62
 
52
63
    /// write one character on the socket.
53
64
    /// @param value the character to write  
54
 
    void write (const char value);
 
65
    long write (const char value);
55
66
 
56
67
    /// write a character string to the socket
57
 
    /// @param value the character string to write
58
 
    void write (const char* value);
 
68
    /// @param data the data to write
 
69
    long write (const char* data);
59
70
 
60
 
    /// @return true if we are at the eof
61
 
    bool iseof (void) const;
62
 
    
63
 
    /// check if we can read one character
64
 
    /// @param tout the timeout value
65
 
    bool valid (const long tout) const;
 
71
    /// write a character array to the socket
 
72
    /// @param rbuf the reference buffer to write
 
73
    /// @param size the number of character to write
 
74
    long write (const char* rbuf, const long size);
66
75
 
67
76
    /// create a new socket by address familly
68
77
    /// @param addr the reference address