[ wxwindows-Patches-1826054 ] Add wxSocketBase::GetInternalSocket
SourceForge.net
noreply at sourceforge.net
Sat Dec 1 19:20:04 PST 2007
Patches item #1826054, was opened at 2007-11-05 05:52
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1826054&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 4
Private: No
Submitted By: Tim Kosse (botg)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add wxSocketBase::GetInternalSocket
Initial Comment:
Sometimes it is necessary to have access to the socket file descriptor, e.g. for use with WSAIoctl under Windows.
To make this possible, I've added the protected function wxSocketBase::GetInternalSocket which simply returns m_socket. From there on, the program can get the file descriptor from GSocket which has everything declared public. According to tn0020.txt, this shouldn't change the ABI.
Leave this function undocumented since it should rarely be used and virtually all usage scenarios are platform specific and not portable at all.
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2007-12-01 19:20
Message:
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2007-11-17 07:27
Message:
Logged In: YES
user_id=71618
Originator: NO
Mac OS X is just Unix so I guess it uses ints like anything else and I'd
still prefer to have a function returning this instead of GSocket.
Unfortunately I don't see any ABI-compatible solution to your SO_XXXBUF
problem...
----------------------------------------------------------------------
Comment By: Tim Kosse (botg)
Date: 2007-11-10 08:00
Message:
Logged In: YES
user_id=156254
Originator: YES
What would be the correct type for sockets on wxMac?
Anyhow, I've hit the next problem: In order to enable a large TCP Window
scale, I need to set SO_SNDBUF or SO_RVCBUF to >=64k _before_ calling
Connect, yet this isn't possible with wxSocket at all, it's missing a
2-stage Create/Connect.
Would SetSocketBufferSizes(int snd, int recv) be a good solution, together
with some new member variables? Then somewhere in GSocket::Connect the
corresponding setsockopt calls would have to be made.
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2007-11-05 17:34
Message:
Logged In: YES
user_id=71618
Originator: NO
First of all, while this doesn't change the ABI, the function should still
be wrapped in wxABI_VERSION check and present in version-script.in.
Second, while I don't dispute that such function can be desirable, I don't
think it makes sense to make it return GSocket because it's not at all
impossible that in the future this entire class disappears (it's basically
useless...). So what about adding GetSocket() returning directly SOCKET/int
(do we need wxSOCKET_T?)? This function would be public and documented.
Thanks
----------------------------------------------------------------------
Comment By: Tim Kosse (botg)
Date: 2007-11-05 05:54
Message:
Logged In: YES
user_id=156254
Originator: YES
Patch is against WX_2_8_BRANCH and also applies against the trunk.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1826054&group_id=9863
More information about the wx-dev
mailing list