This changelog refers to nuget package releases.
Deprecations:
- Support for the iOS "Classic" API, MacOS "Classic" and MonoMac (open source) platforms has been dropped.
Features:
- A
SocketException
class has been added, allowing socket-related exceptions to be caught from PCL code. Thanks @danielcweber - It is now possible to retrieve the
ICommsInterface
that aTcpSocketClient
is connected via. Thanks @fubar-coder - Auto-properties have been replaced with proper events across all classes. Thanks @Waty
TcpSocketClient
'sConnectAsync
method optionally takes aCancellationToken
to support client-invoked cancellation and scenarios like timeout. Thanks @SparkStream- You may now specify a service name rather than port when connecting with a
TcpSocketClient
. Thanks @SparkStream - For those that need it, you can access the underlying .NET or WinRT/UWP socket instance from native (non-PCL) projects. Thanks @SparkStream
UdpSocketClient
can now receive response packets. This simplifies scenarios where you don't need to listen for new packets, but do need to receive response packets. Thanks @SatoshiARA- All the Udp socket classes now include a
Send-
overload that allows you to specify the number of bytes to be read from the input. This can avoid the need to duplicate a buffer when working with streams. Thanks @jasells
Bugfixes:
- Fixed
InvalidCastException
being thrown byTcpSocketListener.Dispose()
. Thanks @Waty - Fix for a rare issue where the Udp classes could throw an exception after receiving an ICMP unreachable packet in certain cases
Other:
- sockets-for-pcl can now also be installed via the Xamarin Component Store. Thanks @mattleibow
- special thanks to @vbisbest for helping work through issues in the prereleases
Features:
TcpSocketClient
andTcpSocketListener
now supports setting of the buffer size used when sending data. If unset, this defaults to zero (unbuffered). This also addresses an inconsistency in default buffer sizes between .NET platforms and WinRT platforms. Thanks @xen2TcpSocketListener
now supports os-based/ephemeral port selection. When passing0
to theport
parameter ofStartListeningAsync
, the selection of bound port is deferred to the operating system. You can determine what port was bound by checking theLocalPort
property.
Bugfixes:
- Fixed incorrect assembly version for WP8.
Features:
- Support for MonoMac, Xamarin.Mac Classic and Xamarin.Mac Unified. Thanks @NewtonARA.
- Extension method
GetStream
added toITcpSocketClient
, easing migration from .NET projects. Thanks @danielcweber.
Other:
- sockets-for-pcl now comes with LINQPad samples! When you add the package to a LINQPad query for the first time, a set of samples will be added to your Samples tab, demonstrating typical usage.
- Will be trying Real Hard to do SemVer properly from now on.
Bugfixes:
- Fixed 'A method was called at an unexpected time' exception when that occured when disconnecting a
UdpSocketMulticastClient
on WinRT. Thanks @aghajani for discovering.
Other:
- Removed unneccessary
async
modifiers andawait
calls.
Features:
UdpSocketReceiver
can now be bound to a port chosen by the operating system. Pass0
to theport
argument ofStartListeningAsync
.
Bugfixes:
- Calling
Dispose
on a boundUdpSocketReceiver
orUdpSocketMulticastClient
now cancels the internal message reading loop.
Bugfixes:
- Fixed a
NullReferenceException
that could occur inCommsInterface.GetAllInterfacesAsync
if an interface had no IPv4 unicast address.
Features:
TcpSocketClient
supports TLS connections via optional parameter onConnectAsync
. Thanks @galvesribeiro.
Bugfixes:
- The backing
UdpClient
instances for the .NET UdpSocket* classes now have theEnableBroadcast
property set to true. This should preventAccess Denied
exceptions from occuring when attempting to send data to a broadcast address. - Fixed an
ObjectDisposedException
that would occur whenSendToAsync
was called a second time on aUdpSocketReceiver
if it had not yet been bound using 'StartListeningAsync`.
Other:
- Fixed an error in the .nuspec that resulted in
Sockets.Plugin.Abstractions
not being available under Windows Desktop. Whoops .
Features:
- Added
CommsInterface
class that abstracts over native network interface representations. UseGetAllInterfacesAsync
to retrieve the available interfaces. - Added optional parameter to listen methods that allows a specific
CommsInterface
to be bound. Ignored on WP8.0.
Other:
- Now with
ERR DIV BY ZERO
% more SemVer.
Bugfixes:
- Fixed a
NullReferenceException
in the .NET abstraction that would occur if aUdpSocketReceiver
'sSendToAsync
method was called beforeStartListeningAsync
.
First published to NuGet.