[ 
https://issues.apache.org/jira/browse/THRIFT-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14500793#comment-14500793
 ] 

ASF GitHub Bot commented on THRIFT-3000:
----------------------------------------

GitHub user Jens-G opened a pull request:

    https://github.com/apache/thrift/pull/450

    THRIFT-3000 .NET implementation has trouble with mixed IP modes

    Client: C#
    Patch: sharpdevel <icode666@github> & Jens Geyer
    
    TcpListener and TcpClient are created based on the capabilities of the used 
runtime framework. For windows the changes automatically handle IPv4 and IPv6 
sockets. In mono it behaves as before.
    
    When using TcpListener and TcpClient it depends on the network 
configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 
the DualMode can be set on the sockets of the listener and the client. The 
sockets then try to establish IPv6 sockets before they fallback to IPv4

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Jens-G/thrift THRIFT-3000-csharp-ipv6

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/450.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #450
    
----
commit 407f31c83dad5b8bd8502856694e4b20ee1d4200
Author: Jens Geyer <je...@apache.org>
Date:   2015-04-17T18:55:05Z

    THRIFT-3000 .NET implementation has trouble with mixed IP modes
    Client: C#
    Patch: sharpdevel <icode666@github> & Jens Geyer
    
    TcpListener and TcpClient are created based on the capabilities of the used 
runtime framework. For windows the changes automatically handle IPv4 and IPv6 
sockets. In mono it behaves as before.
    
    When using TcpListener and TcpClient it depends on the network 
configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 
the DualMode can be set on the sockets of the listener and the client. The 
sockets then try to establish IPv6 sockets before they fallback to IPv4

----


> .NET implementation has trouble with mixed IP modes
> ---------------------------------------------------
>
>                 Key: THRIFT-3000
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3000
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>    Affects Versions: 0.9.2, 0.9.3
>         Environment: Windows 7 / Windows 8 / Windows 8.1 / .NET 3.5 / .NET 
> 4.0 / .NET 4.5
>            Reporter: Tobias Mundt
>            Assignee: Jens Geyer
>            Priority: Minor
>             Fix For: 0.9.3
>
>
> The .NET implementation of TSocket and TServerSocket use the .NET class 
> TcpClient and TcpListener. When creating instances of theses classes the .NET 
> framework estabiles either an IPv4 or an IPv6 lsitener/client depending on 
> the order of network protocols set in the control center for the network 
> adapter. Mention that only the first type of protocol is used not both. 
> Microsoft switched the default order og ipv4 over ipv6 in windows 7 to ipv6 
> over ipv4 in windows 8  and 8.1. That means that a thrift component on a win 
> 7 machine can not talk to the same component on a win 8 machine since they 
> fired of different listeners. 
> When upgrading to .NET 4.5 this can be solved by setting the DualMode=true 
> flag on the TcpListener.Server and the TcpClient.Client sockets. Since 
> DualMode is not supported in Mono as of February 2015. The patch can not be 
> applied.
> Another possible solutions would be to get the configuration of the network 
> protocol order manually and apply the approvriate ip protocol by hand.
> Yet a third possibility would by to add a parameter to the TSocket and 
> TServerSocket constructors to let the user choose the behaviour of the 
> TcpListener and TcpClient
> This problem was attmepted to be solved in the pull request 
> https://github.com/apache/thrift/pull/377 which was rejected due to mono 
> incompatibility



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to