Commit Graph

82 Commits

Author SHA1 Message Date
Vadim Zeitlin
95867b4efc calling Notify() from child thread is ok -- as long as you do it from one and the same thread all the time
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-14 02:03:57 +00:00
Vadim Zeitlin
01c0355483 don't close UDP socket if it receives an empty datagram (patch 1885472)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-09 23:51:38 +00:00
Vadim Zeitlin
cf86dc50e0 undid change to GSocket::Select() done in r50831, do call select() here (part of patch 1833150)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 23:59:09 +00:00
Václav Slavík
2ada746fb4 compilation fix for !wxUSE_THREADS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-20 19:42:04 +00:00
Vadim Zeitlin
2804f77d88 more socket cleanup to allow using wxSocket from both wxBase and wxCore (replaces patch 1756260)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-19 16:45:08 +00:00
Vadim Zeitlin
8575ff507f experimental IPv6 implementation (patch 1771429)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-18 20:53:33 +00:00
Vadim Zeitlin
8c029a5b02 added SetInitialSocketBuffers() to allow changing the send/receive buffer sizes (patch 1829576)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-17 15:21:26 +00:00
David Elliott
dd6c8be6e9 Apply modified patch 1785299 to trunk and 2.8.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-17 21:52:02 +00:00
Vadim Zeitlin
985acf8734 reverted wxSocket changes of rev 48723 as they broke linking under non-Unix systems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-17 00:22:05 +00:00
Vadim Zeitlin
22b6de6a70 more fixes for using wxSocket in console applications (patch 1756260)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-16 14:29:42 +00:00
Vadim Zeitlin
5e1eac149f create the single global IO dispatcher in wxFDIODispatcher; don't use wxSelectDispatcher in wxGSocket as the global dispatcher may be of a different type (modified patch 1733626)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-14 20:18:38 +00:00
Vadim Zeitlin
60edcf4535 added support for broadcasting to UDP sockets (patch 1740266)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-04 21:33:11 +00:00
Vadim Zeitlin
e37e082ef2 generate disconnection event if recv() returns 0 in Detected_Read() (patch 1730589)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-09 11:05:35 +00:00
Vadim Zeitlin
f4854380c1 don't handle orderly socket shutdown by the peer as an error (patch 1688222)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-30 19:02:30 +00:00
Vadim Zeitlin
cd632a8617 shutdown sockets gracefully instead of doing it with TCP reset (patch 1682438)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-17 02:14:33 +00:00
Vadim Zeitlin
01ba4b6713 set SO_REUSEADDR before binding for UDP sockets too (2nd part of patch 1667145)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-10 16:17:44 +00:00
Stefan Neis
2887cb4e38 Attempt at fixing deepCopyHostent/Servent.
Fixed MT problem my making mutexes global.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-07 21:38:08 +00:00
Michael Wetherell
bc023abbbb Detect and use sys/select.h required by POSIX for select
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-09 11:18:24 +00:00
Angel Vidal Veiga
98e7a7f97f Backporting from my SoC branch, fix for remotely closed sockets firing input events till destroyed or closed locally.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-06 04:46:57 +00:00
Kevin Hock
b74865fa61 Rearrange and simplify read and error checks, and remove use of MSG_PEEK that is unneeded and not supported on CE anyway [ Modified & Expanded Patch 1428745 ]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-22 01:55:43 +00:00
Kevin Hock
c232b3cdc6 Respect the REUSEADDR flag to allow rebinding; bind to local port prior to connecting if a local port is specified; add SO_REUSEPORT wherever SO_REUSEADDR is used if SO_REUSEPORT is defined, otherwise reuse fails on BSD systems (e.g. Mac OS X) [ Extension of patch 1415505 ]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-11 23:43:17 +00:00
Stefan Neis
f0b805fab6 Fixed "typo".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-25 17:58:50 +00:00
Stefan Neis
17f66434a4 Cleaned attempts at fixing NetBSD compilation commited in previous version.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-25 14:31:03 +00:00
Stefan Neis
385ebb5d81 Yet another attempt at making the getservbyname_r prototype visible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-23 22:54:56 +00:00
Stefan Neis
539ae551cf Ensure "reasonable" return values even if none of the #ifdef conditions in
wxGet{host,serv}by{name,addr}_r matches.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-14 13:30:58 +00:00
Stefan Neis
127189ebec Replaced get{host,serv}by{name,addr} by the threadsafe wrappers
introduced in the previous revision.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-08 01:33:58 +00:00
Stefan Neis
71b4a9b878 Added thread-safe wrappers for get{host,serv}by{name,addr} to replace the
currently still used unsafe versions once possible compilation
        problems are sorted out.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-03 16:36:20 +00:00
David Surovell
1aa7b427f2 minor cleanup: corrected typos, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-12-01 14:28:30 +00:00
Kevin Hock
9b67181b39 When recv returns 0, the connection has been remotely closed or dropped. Changes are to Read [ modified patch 1303565 ] and Select [ patch 1283936 ]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-05 23:20:10 +00:00
Kevin Hock
c3b501e187 Do not allow events to fire after socket is closed (fixes crash on GTK with GDK_Input events) [Patch 1281054]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-05 15:38:44 +00:00
Vadim Zeitlin
17a1ebd101 first round of Intel compiler warning fixes: down from a few thousands just to slightly more than 100
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 19:59:19 +00:00
Vadim Zeitlin
976abb72fc set error to GSOCK_TIMEOUT if the socket timed out (modified and extended patch 1303554)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-24 22:31:55 +00:00
Julian Smart
a36876368a Missing end of comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-19 15:18:27 +00:00
Kevin Hock
0d34c30e55 Make sure Enable_Events is called when a connection is immediately established (such as when using domain sockets for IPC). Fixes bug 1195700
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-19 14:56:50 +00:00
Vadim Zeitlin
defbeca1b8 use extern C around signal handler declaration (fixes Sun CC warning)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-13 15:57:02 +00:00
Julian Smart
60b0bd1dd1 Applied patch [ 1283943 ] Fix crash in GSocket::Select
From Paul Rupe


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-09 14:44:15 +00:00
Vadim Zeitlin
0beb873533 include wx/defs.h (and hence wx/platform.h and so really fix the bug 1105676)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-03 23:16:50 +00:00
Stefan Neis
9e03e02d0c Replaced SOCKLEN_T by WX_SOCKLEN_T to resolve conflict with AIX system headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-31 15:48:41 +00:00
Włodzimierz Skiba
5fb9aa5673 Better 'missing WXUNUSED' workaround (perhaps unnecessary if nomore standalone option possible).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-26 15:38:55 +00:00
Włodzimierz Skiba
c40158e40b Corrections for future OW 1.4. Warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-26 09:05:27 +00:00
Włodzimierz Skiba
7e1e696511 wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source cleaning and other Watcom adjustements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-21 17:18:43 +00:00
Julian Smart
d69225772a Olly Betts' typo patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-31 09:29:22 +00:00
Stefan Csomor
fcbd7e5a12 now it's uint32 on mac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-07 13:35:09 +00:00
Julian Smart
99d800190a Added licence/copyright information
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-04 18:57:50 +00:00
Stefan Neis
8c0f890626 Fixed compilation error on unknown type "in_addr_t".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-28 19:46:01 +00:00
Kevin Hock
e400d27dcc Added comments explaining more about the changes in my last commit. Also, removed __DARWIN__ check for enabling CONNECTION events, always wait to enable them until after the connect() call.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-16 05:11:37 +00:00
David Elliott
7be8c821b7 Dammit, try it again this time actually removing it instead of adding it
again (forgot to give patch the -R).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-14 02:15:41 +00:00
David Elliott
b35bb76271 Reverted 1.32. This breaks my Tiger builds which is part of the reason
I reverted the last incarnation of this in the first place!!!


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-14 02:12:15 +00:00
Kevin Hock
bb154f79f3 Automatic use of MSG_NOSIGNAL or SO_NOSIGPIPE (checked at compile time); moved enabling of connection events on Darwin after connection has been accepted in WaitConnection; in Connect, enable events only after connection has succeeded rather than unconditionally before; do not close connection when a socket call results in EWOULDBLOCK, EAGAIN or EINTR, as these do not indicate a closed connection; loop around calls to send and recv so that socket calls returning EINTR can be immediately retried; check for invalid socket pointer in Detected_Read
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-09 18:12:27 +00:00
Vadim Zeitlin
1d836590aa fix warning about comparing (signed) -1 with (unsigned) in_addr_t under Solaris
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-06 13:43:56 +00:00