summaryrefslogtreecommitdiffstats
path: root/src/network/qsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/qsocket.cpp')
-rw-r--r--src/network/qsocket.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/network/qsocket.cpp b/src/network/qsocket.cpp
index 10cd2173e..fe6e0b6c0 100644
--- a/src/network/qsocket.cpp
+++ b/src/network/qsocket.cpp
@@ -88,7 +88,7 @@
buffer.open( IO_ReadOnly );
TQDataStream os( &buffer );
- Q_UINT32 x;
+ TQ_UINT32 x;
os >> x;
buffer.close();
@@ -101,7 +101,7 @@
TQBuffer buf;
buf.open( IO_ReadOnly );
TQDataStream ds( &buf );
- Q_INT32 x;
+ TQ_INT32 x;
ds >> x;
buf.close();
@@ -123,11 +123,11 @@ public:
TQSocket::State state; // connection state
TQString host; // host name
- Q_UINT16 port; // host port
+ TQ_UINT16 port; // host port
TQSocketDevice *socket; // connection socket
TQSocketNotifier *rsn, *wsn; // socket notifiers
TQMembuf rba; // read buffer
- Q_ULONG readBufferSize; // limit for the read buffer size
+ TQ_ULONG readBufferSize; // limit for the read buffer size
TQPtrList<TQByteArray> wba; // list of write bufs
TQHostAddress addr; // connection address
TQValueList<TQHostAddress> addresses; // alternatives looked up
@@ -408,7 +408,7 @@ TQSocket::State TQSocket::state() const
\sa state()
*/
-void TQSocket::connectToHost( const TQString &host, Q_UINT16 port )
+void TQSocket::connectToHost( const TQString &host, TQ_UINT16 port )
{
#if defined(TQSOCKET_DEBUG)
tqDebug( "TQSocket (%s)::connectToHost: host %s, port %d",
@@ -716,7 +716,7 @@ void TQSocket::close()
buffer.
*/
-bool TQSocket::consumeWriteBuf( Q_ULONG nbytes )
+bool TQSocket::consumeWriteBuf( TQ_ULONG nbytes )
{
if ( nbytes <= 0 || nbytes > d->wsize )
return FALSE;
@@ -860,7 +860,7 @@ bool TQSocket::at( Offset index )
{
if ( index > d->rba.size() )
return FALSE;
- d->rba.consumeBytes( (Q_ULONG)index, 0 ); // throw away data 0..index-1
+ d->rba.consumeBytes( (TQ_ULONG)index, 0 ); // throw away data 0..index-1
// After we read data from our internal buffer, if we use the
// setReadBufferSize() to limit our buffer, we might now be able to
// read more data in our buffer. So enable the read socket notifier,
@@ -899,7 +899,7 @@ bool TQSocket::atEnd() const
\sa bytesToWrite()
*/
-Q_ULONG TQSocket::bytesAvailable() const
+TQ_ULONG TQSocket::bytesAvailable() const
{
if ( d->socket == 0 )
return 0;
@@ -929,7 +929,7 @@ Q_ULONG TQSocket::bytesAvailable() const
\sa bytesAvailable()
*/
-Q_ULONG TQSocket::waitForMore( int msecs, bool *timeout ) const
+TQ_ULONG TQSocket::waitForMore( int msecs, bool *timeout ) const
{
if ( d->socket == 0 )
return 0;
@@ -942,7 +942,7 @@ Q_ULONG TQSocket::waitForMore( int msecs, bool *timeout ) const
/*! \overload
*/
-Q_ULONG TQSocket::waitForMore( int msecs ) const
+TQ_ULONG TQSocket::waitForMore( int msecs ) const
{
return waitForMore( msecs, 0 );
}
@@ -954,7 +954,7 @@ Q_ULONG TQSocket::waitForMore( int msecs ) const
\sa bytesAvailable() clearPendingData()
*/
-Q_ULONG TQSocket::bytesToWrite() const
+TQ_ULONG TQSocket::bytesToWrite() const
{
return d->wsize;
}
@@ -977,7 +977,7 @@ void TQSocket::clearPendingData()
number of bytes read. Returns -1 if an error occurred.
*/
-Q_LONG TQSocket::readBlock( char *data, Q_ULONG maxlen )
+TQ_LONG TQSocket::readBlock( char *data, TQ_ULONG maxlen )
{
if ( data == 0 && maxlen != 0 ) {
#if defined(QT_CHECK_NULL)
@@ -1015,7 +1015,7 @@ Q_LONG TQSocket::readBlock( char *data, Q_ULONG maxlen )
number of bytes written. Returns -1 if an error occurred.
*/
-Q_LONG TQSocket::writeBlock( const char *data, Q_ULONG len )
+TQ_LONG TQSocket::writeBlock( const char *data, TQ_ULONG len )
{
#if defined(QT_CHECK_NULL)
if ( data == 0 && len != 0 ) {
@@ -1158,7 +1158,7 @@ bool TQSocket::canReadLine() const
\internal
So that it's not hidden by our other readLine().
*/
-Q_LONG TQSocket::readLine( char *data, Q_ULONG maxlen )
+TQ_LONG TQSocket::readLine( char *data, TQ_ULONG maxlen )
{
return TQIODevice::readLine(data,maxlen);
}
@@ -1196,7 +1196,7 @@ TQString TQSocket::readLine()
void TQSocket::sn_read( bool force )
{
- Q_LONG maxToRead = 0;
+ TQ_LONG maxToRead = 0;
if ( d->readBufferSize > 0 ) {
maxToRead = d->readBufferSize - d->rba.size();
if ( maxToRead <= 0 ) {
@@ -1214,8 +1214,8 @@ void TQSocket::sn_read( bool force )
TQSocketPrivate::sn_read_alreadyCalled.append( this );
char buf[4096];
- Q_LONG nbytes = d->socket->bytesAvailable();
- Q_LONG nread;
+ TQ_LONG nbytes = d->socket->bytesAvailable();
+ TQ_LONG nread;
TQByteArray *a = 0;
if ( state() == Connecting ) {
@@ -1239,7 +1239,7 @@ void TQSocket::sn_read( bool force )
// event is processed. A new read operation would then block.
// This code is also useful when TQSocket is used without an
// event loop.
- nread = d->socket->readBlock( buf, maxToRead ? TQMIN((Q_LONG)sizeof(buf),maxToRead) : sizeof(buf) );
+ nread = d->socket->readBlock( buf, maxToRead ? TQMIN((TQ_LONG)sizeof(buf),maxToRead) : sizeof(buf) );
if ( nread == 0 ) { // really closed
if ( !d->socket->isOpen() ) {
#if defined(TQSOCKET_DEBUG)
@@ -1280,7 +1280,7 @@ void TQSocket::sn_read( bool force )
nread = d->socket->readBlock( a->data(), maxToRead ? TQMIN(nbytes,maxToRead) : nbytes );
} else {
a = 0;
- nread = d->socket->readBlock( buf, maxToRead ? TQMIN((Q_LONG)sizeof(buf),maxToRead) : sizeof(buf) );
+ nread = d->socket->readBlock( buf, maxToRead ? TQMIN((TQ_LONG)sizeof(buf),maxToRead) : sizeof(buf) );
if ( nread > 0 ) {
// ##### could setRawData
a = new TQByteArray( nread );
@@ -1408,7 +1408,7 @@ void TQSocket::setSocketIntern( int socket )
clearPendingData();
close();
}
- Q_ULONG oldBufferSize = d ? d->readBufferSize : 0;
+ TQ_ULONG oldBufferSize = d ? d->readBufferSize : 0;
delete d;
d = new TQSocketPrivate;
@@ -1443,7 +1443,7 @@ void TQSocket::setSocketIntern( int socket )
Returns the host port number of this socket, in native byte order.
*/
-Q_UINT16 TQSocket::port() const
+TQ_UINT16 TQSocket::port() const
{
if ( d->socket == 0 )
return 0;
@@ -1460,7 +1460,7 @@ Q_UINT16 TQSocket::port() const
there is no need to call htons().
*/
-Q_UINT16 TQSocket::peerPort() const
+TQ_UINT16 TQSocket::peerPort() const
{
if ( d->socket == 0 )
return 0;
@@ -1527,7 +1527,7 @@ TQString TQSocket::peerName() const
\sa readBufferSize()
*/
-void TQSocket::setReadBufferSize( Q_ULONG bufSize )
+void TQSocket::setReadBufferSize( TQ_ULONG bufSize )
{
d->readBufferSize = bufSize;
}
@@ -1538,7 +1538,7 @@ void TQSocket::setReadBufferSize( Q_ULONG bufSize )
\sa setReadBufferSize()
*/
-Q_ULONG TQSocket::readBufferSize() const
+TQ_ULONG TQSocket::readBufferSize() const
{
return d->readBufferSize;
}