summaryrefslogtreecommitdiff
path: root/src/tcpsocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcpsocket.h')
-rw-r--r--src/tcpsocket.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/tcpsocket.h b/src/tcpsocket.h
index 3361e84..8543ad0 100644
--- a/src/tcpsocket.h
+++ b/src/tcpsocket.h
@@ -10,6 +10,7 @@
10 10
11#include <stdint.h> 11#include <stdint.h>
12 12
13#include "bu/config.h"
13#include "bu/stream.h" 14#include "bu/stream.h"
14#include "bu/fstring.h" 15#include "bu/fstring.h"
15#include "bu/exceptionbase.h" 16#include "bu/exceptionbase.h"
@@ -66,18 +67,18 @@ namespace Bu
66 67
67 virtual void close(); 68 virtual void close();
68 //virtual void read(); 69 //virtual void read();
69 virtual size_t read( void *pBuf, size_t nBytes ); 70 virtual size read( void *pBuf, size nBytes );
70 virtual size_t read( void *pBuf, size_t nBytes, 71 virtual size read( void *pBuf, size nBytes,
71 uint32_t nSec, uint32_t nUSec=0 ); 72 uint32_t nSec, uint32_t nUSec=0 );
72 virtual size_t write( const void *pBuf, size_t nBytes ); 73 virtual size write( const void *pBuf, size nBytes );
73 virtual size_t write( const void *pBuf, size_t nBytes, 74 virtual size write( const void *pBuf, size nBytes,
74 uint32_t nSec, uint32_t nUSec=0 ); 75 uint32_t nSec, uint32_t nUSec=0 );
75 using Stream::write; 76 using Stream::write;
76 77
77 virtual long tell(); 78 virtual size tell();
78 virtual void seek( long offset ); 79 virtual void seek( size offset );
79 virtual void setPos( long pos ); 80 virtual void setPos( size pos );
80 virtual void setPosEnd( long pos ); 81 virtual void setPosEnd( size pos );
81 virtual bool isEos(); 82 virtual bool isEos();
82 virtual bool isOpen(); 83 virtual bool isOpen();
83 84
@@ -93,11 +94,15 @@ namespace Bu
93 virtual bool isBlocking(); 94 virtual bool isBlocking();
94 virtual void setBlocking( bool bBlocking=true ); 95 virtual void setBlocking( bool bBlocking=true );
95 96
96 virtual void setSize( long iSize ); 97 virtual void setSize( size iSize );
97 98
98 Bu::FString getAddress() const; 99 Bu::FString getAddress() const;
99 operator int() const; 100 operator int() const;
100 101
102 virtual size getSize() const;
103 virtual size getBlockSize() const;
104 virtual Bu::FString getLocation() const;
105
101 private: 106 private:
102 void setAddress(); 107 void setAddress();
103 108