summaryrefslogtreecommitdiffstats
path: root/libvncserver/sockets.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #128 from zmedico/autoprobe-selectiveChristian Beier2016-11-201-7/+9
|\ | | | | Support autoPort with ipv4 or ipv6 disabled
| * Support autoPort with ipv4 or ipv6 disabledZac Medico2016-08-141-7/+9
| | | | | | | | | | | | | | | | | | Make it possible to get autoPort behavior with either ipv4 or ipv6 disabled, by setting rfbScreen->ipv6port or rfbScreen->port to a negative number. This will make it possible for x11vnc to enforce its -noipv6 option, as discussed in the following bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672449
* | Support systemd socket activationKyle Russell2016-09-211-44/+68
|/
* Avoid calling SSL_pending when connection is already closedGeorge Fleury2016-05-131-1/+1
| | | | Avoid calling SSL_pending when connection is already closed, calling SSL_pending with connection already closed is crashing. To reproduce, open a secure websocket binay protocol connection with libvncserver compiled with OpenSSL, and when libvncserver is waiting for rfbProcessClientProtocolVersion send any invalid char, it will fail and call rfbCloseClient whith destroy all SSL context, calling SSL_pending after that will generate a invalid access.
* Merge pull request #103 from rdieter/masterChristian Beier2016-04-241-4/+4
|\ | | | | use namespaced vnc_max macro (issue #102)
| * use namespaced rfbMax macro (issue #102)Rex Dieter2016-04-181-4/+4
| | | | | | | | Not using generic 'max', avoids conflicts with stl_algobase.h
* | Enable AF_UNIX socket: ignore setsockopt TCP_NODELAY failure.Wen Shuguang2016-04-151-8/+3
|/
* Fix some typos (found by codespell)Stefan Weil2015-10-091-1/+1
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix handling of multiple VNC commands per websockets frameFloris Bos2015-01-171-0/+8
| | | | | | | | | | | | | - When processing input, check if there is any extra data pending in the internal websocket frame and SSL buffers. - Prevents input events lagging behind because they get stuck in one of the buffers. Data pending in our own buffers cannot be detected with select() so was not processed until more input arrives from the network. - Closes # 55 Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
* Update comments regarding rfbClientConnectionGone().Christian Beier2014-10-211-2/+3
|
* Generally adjusting headers for compiling on windows without the mixing of ↵Daniel Cohen Gindi2014-09-201-0/+5
| | | | Winsock 1 and 2.
* Fixed a violation of the C89 standard ("declarations must come before ↵Daniel Cohen Gindi2014-09-201-4/+6
| | | | instructions")
* `strings.h` and `resolv.h` are not available on MSVC, and some POSIX ↵Daniel Cohen Gindi2014-09-201-0/+4
| | | | | | functions are renamed or deprecated For all of those missing/deprecated POSIX functions, we just add a macro mapping to the _underscored version of MSVC.
* allow rfbInitSockets with non-ready states.Amandeep Singh2014-08-031-2/+3
| | | | | This allows for reinitializations of e. g. sockets in a SHUTDOWN state. The only state that doesn't make sense to reinitialize are READY states.
* Tune the definitions needed when building with -ansi.Raphael Kubo da Costa2012-09-141-1/+5
| | | | | | | | | | | | | The current definitions were mostly useful to glibc and followed its feature_test_macros(3) documentation. However, this means other platforms still had problems when building with strict compilation flags. _BSD_SOURCE, for example, is only recognized by glibc, and other platforms sometimes need _XOPEN_SOURCE instead, or even the removal of some definitions (such as the outdate _POSIX_SOURCE one). _POSIX_SOURCE also had to be conditionally defined in some places, as what it enables or disables during compilation varies across systems.
* Add some missing feature macro definitions.Raphael Kubo da Costa2012-09-141-0/+5
| | | | | | | Building with -ansi failed due to some code (as well as system headers) using non-C89 features. Fix that by adding the usual _POSIX_SOURCE and _BSD_SOURCE definitions already present in some other files.
* Patched sockets.c to allow the use of IPv6 without IPv4.Oliver Loch2012-08-191-1/+6
| | | | As requested only those lines are indented that have been changed.
* libvncserver/sockets.c: do not segfault when listenSock/listen6Sock == -1Kyle J. McKay2012-05-211-2/+2
|
* IPv6 support for LibVNCServer, part four: add copyright notices to files ↵Christian Beier2012-04-021-0/+1
| | | | with non-trivial changes.
* IPv6 support for LibVNCServer, part three: make reverse connections ↵Christian Beier2012-03-101-2/+40
| | | | | | | | IPv6-capable. Besided making libvncserver reverseVNC IPv6-aware, this introduces some changes on the client side as well to make clients listen on IPv6 sockets, too. Like the server side, this also uses a separate-socket approach.
* IPv6 support for LibVNCServer, part onepointseven: Plug a memleak.Christian Beier2012-03-101-0/+3
| | | | | We have to properly free the addrinfo struct when jumping out of the function.
* IPv6 support for LibVNCServer, part onepointfive: Fix compilation with IPv6 ↵Christian Beier2012-02-271-0/+4
| | | | | | missing. There was an oversight that crept in...
* IPv6 support for LibVNCServer, part one: accept IPv4 and IPv6 connections.Christian Beier2012-02-201-7/+159
| | | | | | | | | This uses a separate-socket approach since there are systems that do not support dual binding sockets under *any* circumstances, for instance OpenBSD. Using separate sockets for IPv4 and IPv6 is thus more portable than having a v6 socket handle v4 connections as well. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* websockets: Move Hixie disconnect hack to websockets.cGernot Tenchio2011-08-251-2/+2
| | | | | | Move the hixie disconnect hack to websockets.c. Removed the remaining websockets vars from rfbClientPtr, so all websockets stuff is hidden behind an opaque pointer.
* websockets: Initial HyBi supportGernot Tenchio2011-08-251-2/+3
|
* websockets: Add wspath member to rfbClientRecGernot Tenchio2011-08-171-0/+1
| | | | | | | Added wspath member to rfbClientRec which holds the path component of the initial websocket request. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Add encryption supportGernot Tenchio2011-08-171-5/+38
| | | | | | | [jes: moved out GnuTLS and OpenSSL support, added a dummy support, to separate changes better, and to keep things compiling] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* websockets: Initial WebSockets support.Joel Martin2011-08-171-0/+83
| | | | | | | | | | | | | | Has a bug: WebSocket client disconnects are not detected. rfbSendFramebufferUpdate is doing a MSG_PEEK recv to determine if enough data is available which prevents a disconnect from being detected. Otherwise it's working pretty well. [jes: moved added struct members to the end for binary compatibility with previous LibVNCServer versions, removed an unused variable] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Remove some unused variables.Christian Beier2011-06-011-2/+0
|
* Fix rfbProcessNewConnection to return some value instead of void.George Kiagiadakis2011-06-011-6/+9
| | | | | | BUG: 256891 Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Split two event-loop related functions out of the rfbProcessEvents() mechanism.George Kiagiadakis2011-06-011-31/+42
| | | | | | | This is required to be able to do proper event loop integration with Qt. Idea was taken from vino's libvncserver fork. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Set proper file permissions for source files.Christian Beier2011-03-101-0/+0
|
* Call WSAGetLastError() everywhere errno is read after a Winsock call.Christian Beier2011-03-031-0/+3
| | | | | Winsock does NOT update errno for us, we have fetch the last error manually using WSAGetLastError().
* libvncserver sockets: check cl->screen before accessing itTobias Doerffel2010-12-011-2/+2
| | | | | | | | | In commit 079394ca5b14d8067b95a9cf95a834828b4425a6 new code with insufficient checks was introduced causing a segfault when doing a HTTP server connection. Such connections have no screen set in the client data structure. Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
* libvncserver sockets: favor per-screen maxclientwait over global one when set.Christian Beier2010-11-181-3/+8
| | | | Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Non-blocking sockets for Windows.Christian Beier2010-09-131-15/+25
| | | | | | | | | | | Expands the SetNonBlocking() function in libvncclient/sockets.c to also work under Windows and also changes it to honour maybe already present socket flags. A similar function was introduced for libvncserver as well and all the #ifdef'ed fnctl calls replaced with calls to that one. Signed-off-by: Christian Beier <dontmind@freeshell.org>
* Add locks of updateMutex in rfbRedrawAfterHideCursor() andrunge2009-12-011-1/+1
| | | | rfbSetClientColourMap(). Up listen limit from 5 to 32.
* The great UltraVNC Compatibility Commitsteven_carr2006-05-151-3/+19
|
* rfbCheckFds now returns the number of processed eventsdscho2006-02-281-10/+13
|
* add handleEventsEagerly flag (Thanks, Donald)dscho2006-02-281-82/+86
|
* assorted fixes for MinGW32dscho2005-12-191-14/+17
|
* work around write() returning ENOENT on Solaris 2.7dscho2005-12-091-0/+3
|
* This monster commit contains support for TightVNC's file transfer protocol.dscho2005-09-281-0/+8
| | | | Thank you very much, Rohit!
* Introduce generic protocol extension method. Deprecatedscho2005-09-271-0/+7
| | | | the processCustomClientMessage() method.
* ANSIfy, fix some warnings from Linus' sparsedscho2005-05-151-20/+14
|
* socketInitDone -> socketStatedscho2005-05-071-2/+27
|
* add '-listen ipaddr' optionrunge2005-03-051-11/+31
|
* support MinGW32!dscho2004-12-011-13/+10
|
* global structures/functions should have "rfb", "sra" or "zrle" as prefix,dscho2004-08-301-22/+22
| | | | while structure members should not
* debugdscho2004-06-181-0/+8
|