summaryrefslogtreecommitdiffstats
path: root/src/network/socket
Commit message (Collapse)AuthorAgeFilesLines
* QLocalSocket/Win: QLocalSocketPrivate::bytesAvailable renamedJoerg Bornemann2010-06-102-6/+8
| | | | | | | QLocalSocketPrivate::bytesAvailable has been renamed to QLocalSocketPrivate::checkPipeState to match the purpose of this method. Reviewed-by: ossi
* QLocalSocket: fix reading from a socket after broken connectionJoerg Bornemann2010-06-101-4/+6
| | | | | | | | | Reading from a socket with a broken connection didn't work, even if there were still bytes to read in the internal read buffer. Autotest: tst_QLocalSocket::writeToClientAndDisconnect Task-number: QTBUG-10921 Reviewed-by: ossi
* QLocalServer: make many simultaneous connection attempts work on WindowsJoerg Bornemann2010-06-102-1/+6
| | | | | | | | | Don't call GetOverlappedResult if ConnectNamedPipe connects instantly. Autotest: tst_qlocalsocket::threadedConnection Task-number: QTBUG-8477 Done-with: ossi Reviewed-by: ossi
* Removed double EINTR loop from nativeWrite and nativeRead.Janne Anttila2010-05-211-8/+2
| | | | | | | | | | | | qt_safe_write and and qt_safe_read already contain EINTR_LOOP. It seems that this loop has been added to code due to merge/clean-up errors in commits: 4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1 f0a8feed9e9b4de10df76faa350201edaef98f1d Reviewed-by: Aleksandar Sasha Babic Reviewed-by: Markus Goetz
* fix crash in QLocalServer::close on WindowsJoerg Bornemann2010-05-041-1/+1
| | | | | | | | | If _q_onNewConnection failed, then QLocalServer got into a bad state. QLocalServer::isListening() still returned true and QLocalServer::close() crashed. Task-number: QTBUG-10388 Reviewed-by: ossi
* Ensure we stop the name lookups in QAbstractSocket if we abort().Thiago Macieira2010-04-201-0/+4
| | | | | | | If we're not even going to connect, there's no point in trying to get the host resolution Reviewed-By: Markus Goetz
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-04-124-9/+50
|\ | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed app freeze if switching to offline in middle of HTTP transaction. Document Symbian platform security requirements on Qt APIs Fixed app freeze if switching to offline in middle of HTTP transaction. Removed QtDeclarative.dll deployment from qt.iby in 4.6 branch. Don't build QtXmlPatterns' command line tools on Symbian.
| * Document Symbian platform security requirements on Qt APIsFrans Englich2010-04-123-0/+30
| | | | | | | | | | | | | | | | | | Work done jointly by Gareth and me. Yields no qdoc errors. Task-number: QTBUG-9342 Task-number: QTBUG-9120 Reviewed-by: Gareth Stockwell Reviewed-by: David Boddie
| * Fixed app freeze if switching to offline in middle of HTTP transaction.Janne Anttila2010-04-121-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When active socket is disconnected by swithcing to offline mode, native RSocket completes the active socket operations with KErrCancel (-3). Open C maps this error code to POSIX errno EINTR (4). Normally in Posix EINTR is only used to indicate that some operation was interrupted by POSIX signal. Qt has a while loops in network operations to handle operations interrupterd by signals. These while loops will be effectively forever loops in Symbian due to Open C error code mapping. Because Symbian does not have native support for signals, i.e. the network operations can never be really interrupted by POSIX signal, it is ok to remove these while loops completely on Symbian platform. This fix is a workaround to Open C incorrect error mapping, and should be removed once Open C has fixed their error mapping. Task-number: QT-3274 Reviewed-by: Aleksandar Sasha Babic
* | fix closing state in QLocalSocket on WindowsJoerg Bornemann2010-04-121-1/+9
|/ | | | | | | | When closing a QLocalSocket, which has unwritten data, the pipe writer was never deleted. Thus writing after a reconnect didn't work. Task-number: QTBUG-9681 Reviewed-by: ossi
* Document some stuff in QHostInfo and QAbstractSocketMarkus Goetz2010-03-041-0/+8
|
* QAbstractSocket: Use new faster DNS functionMarkus Goetz2010-03-021-2/+16
| | | | | | | Use qt_qhostinfo_lookup which avoids the event loop when the DNS result is already cached. Reviewed-by: Thiago
* QAbstractSocket: Clarify documentationMarkus Goetz2010-02-221-2/+8
| | | | Reviewed-by: Thiago
* QLocalSocket::isValid on Windows must check for broken connectionJoerg Bornemann2010-02-161-1/+4
| | | | Reviewed-by: ossi
* fix pipe handle leak in qlocalsocket_win.cppJoerg Bornemann2010-02-162-6/+17
| | | | | | | | | Destroying a QLocalSocket with unwritten data left unclosed handles behind. The connection wasn't closed properly, such that the other end didn't get notified about the connection loss. Task-number: QTBUG-7815 Reviewed-by: ossi
* QTcpServer: Clarify thread affinity of incoming QTcpSocketMarkus Goetz2010-02-031-0/+9
| | | | | | | | We had some bugreports and support requests related to misunderstandings about this. Reviewed-by: Peter Hartmann Reviewed-by: David Boddie
* Call cheaper clear() instead of assigning new QString()Markus Goetz2010-01-283-17/+17
| | | | | Reviewed-by: joao Reviewed-by: Peter Hartmann
* QNativeSocketEngine: Set OS error strings on failed read()Markus Goetz2010-01-253-4/+7
| | | | Reviewed-by: thiago
* QNativeSocketEngine: Also handle unknown errors from socket engineMarkus Goetz2010-01-251-0/+5
| | | | | | Task-number: QTBUG-7316 Task-number: QTBUG-7317 Reviewed-by: thiago
* QNativeSocketEngine_win: Don't mess with linger settingsMarkus Goetz2010-01-251-2/+4
| | | | Reviewed-by: thiago
* Avoid calling WSAGetLastError() so often in nativeWriteMarkus Goetz2010-01-201-3/+3
| | | | Reviewed-by: joao
* QNativeSocketEngine windows: Fix performance degredation in write()Markus Goetz2010-01-191-2/+11
| | | | | | | | We had an hack in the code that chunked writes. Try to avoid this since the hack is probably only needed for older windows versions. Task-number: QTBUG-7344 Reviewed-by: Peter Hartmann
* Update copyright year to 2010Jason McDonald2010-01-0633-33/+33
| | | | Reviewed-by: Trust Me
* QHttpSocketEngine: Remove unneeded codeMarkus Goetz2010-01-062-18/+4
| | | | | | | There was a buffer that is always empty since it was only used for parsing the HTTP proxy protocol, not the actual socket data. Reviewed-by: Peter Hartmann
* QAbstractSocket: Fix warnings when compiling with QABSTRACTSOCKET_DEBUGMarkus Goetz2010-01-061-9/+9
|
* QAbstractSocket: Warn when wrong QHostInfo was receivedMarkus Goetz2010-01-061-0/+4
| | | | | | Let's see if this happens. Reviewed-by: Thiago
* QNativeSocketEngine: Compile fixMarkus Goetz2009-11-191-1/+1
| | | | Reviewed-by: Peter Hartmann
* QTcpSocket: Fix waitForConnected on WindowsMarkus Goetz2009-11-192-7/+65
| | | | | | | | | The select() system call was used in the wrong way. We need to select for exceptions too. Task-number: QTBUG-5799 Reviewed-by: Aleksandar Sasha Babic <aleksandar.babic@nokia.com> Reviewed-by: Peter Hartmann
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-061-3/+3
|\
| * Doc: Fixed qdoc warnings.David Boddie2009-11-041-3/+3
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-0411-25/+89
|\ \ | |/
| * Merge branch '4.6' into core-4.6Thiago Macieira2009-10-291-26/+26
| |\
| * | QLocalServer: block indefinitely when timeout value is -1Peter Hartmann2009-10-281-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | ... as described in the documentation. Furthermore: * use qt_safe_select to timeout correctly * return immediately when timeout value is 0 Reviewed-by: Oswald Buddenhagen
| * | QAbstractSocket: insert timer to prevent timeoutPeter Hartmann2009-10-273-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a timeout that occurred on Mac with the gui event dispatcher: we were waiting for a write notification, but timed out when we were in closing state and still waiting for the socket engine to complete writing. Now we close the socket anyway after 2 seconds. Reviewed-by: Thiago Macieira
| * | QAbstractSocket: wait with closing until all bytes have been writtenPeter Hartmann2009-10-278-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only disconnect from host when all bytes have been written; i.e. not only check whether the write buffer is empty, but also check whether the socket engine has still bytes to write. This is necessary for HTTP and SOCKS5 socket engine, because they both contain an inner TCP socket which also does buffering. For the native socket engine, there is no difference with this patch. Reviewed-by: Markus Goetz Reviewed-by: Thiago Macieira
* | | fix canReadLine() erroneously returning trueOswald Buddenhagen2009-11-031-1/+2
| |/ |/| | | | | | | | | | | the indexOf() call did not consider actualReadBufferSize and thus scanned uninitialized memory for newlines. Reviewed-by: phartman
* | QNativeSocketEngine: Actually use translationsMarkus Goetz2009-10-281-26/+26
|/ | | | | Task-number: QTBUG-4984 Reviewed-by: Thiago
* QSslSocket: Also handle setSocketOptionMarkus Goetz2009-10-191-0/+13
| | | | | | | Handle setSocketOption and forward it to the plainSocket that QSslSocket is using internally. Reviewed-by: Thiago
* QAbstractSocket::setSocketOption: Make const referenceMarkus Goetz2009-10-062-3/+3
| | | | | | After 4.6 API review. Reviewed-by: Volker Hilsheimer
* Dealing with socket that was signalized on exception fds setAleksandar Sasha Babic2009-10-021-3/+5
| | | | | | | | | | | It turns out that if socket was signalized via exception fds set, we should signalize only write notifier in the case where both read and write notifiers exist. If in this case we send signal to read notification socket will prematurely be closed. x#Reviewed-by: Janne Antilla
* Workaround for Open C bugAleksandar Sasha Babic2009-10-021-1/+1
| | | | Workaorund for SO_REUSEPORT / SO_REUSEADDR regression bug.
* QNativeSocketEngine on Windows: don't bail out on non-fatal errorPeter Hartmann2009-09-151-3/+9
| | | | | | | | receiving the WSAEMSGSIZE error means we could not read all the data because the buffer was too small, but still we should return the number of bytes read and not return -1 Reviewed-by: Marius Storm-Olsen
* QLocalSocket (Win) emit readChannelFinished only onceJoerg Bornemann2009-09-111-1/+2
| | | | | | | If pipeClosed is true, then we've already emitted the readChannelFinished signal. We must not do this in close() in that case. Reviewed-by: ossi
* QLocalSocket::readData (Windows) must return -1 on EOFJoerg Bornemann2009-09-101-1/+4
| | | | | | | | If we've detected a broken pipe and we have no more data in the read buffer, then we return -1 to signal EOF. Additionally, we close the QLocalSocket. Reviewed-by: ossi
* QLocalSocket Windows: emit readChannelFinished if broken pipe detectedJoerg Bornemann2009-09-101-0/+4
| | | | | | | If we detect in a read operation that the pipe has been closed, we must emit the readChannelFinished signal. Reviewed-by: ossi
* Update license headers again.Jason McDonald2009-09-0933-132/+132
| | | | Reviewed-by: Trust Me
* Fix windows implemetation of QLocalSocket to emit bytesWritten() signalabcd2009-09-091-1/+2
| | | | | | | | Have QWindowsPipeWriter emit a bytesWritten signal and have QLocalSocket connect this to its own bytesWritten signal. This change contains an autotest to check for the signal emission. Previously there was no implementation to emit the signal.
* QAbstractSocket: Missing initializationsMarkus Goetz2009-09-042-1/+5
|
* fix disconnect-after-write-problem in QLocalSocket on WindowsJoerg Bornemann2009-09-042-11/+34
| | | | | | | | | If the server disconnects directly after writing its data, like the localfortuneserver example does, we must close the reading client socket. Before this patch, an error was yielded. Task-number: 260631 Reviewed-by: phartman
* QNativeSocketEngine: do not issue warning if socketDescriptor is <= 0Peter Hartmann2009-09-021-1/+4
| | | | | | ... but leave it there on Symbian. Reviewed-by: Aleksandar Sasha Babic