[ https://issues.apache.org/jira/browse/THRIFT-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer updated THRIFT-5610: ------------------------------- Component/s: netstd - Library > Help with inconsistencies in TSocketTransport > --------------------------------------------- > > Key: THRIFT-5610 > URL: https://issues.apache.org/jira/browse/THRIFT-5610 > Project: Thrift > Issue Type: Question > Components: netstd - Library > Affects Versions: 0.16.0 > Environment: Windows 10. Visual Studio 2022 17.3. > Reporter: Philip Lee > Priority: Major > Attachments: Program.cs > > > We have some software that communicates with a hardware device using Thrift. > The software was until recently using Thrift 0.9.x (I know - old), and this > worked fine. > Thrift 0.16.0 worked fine when communicating over the office network but the > code failed when communicating with the device over a second NIC where there > was no DNS entry. Thrift 0.9 was ok with this scenario. > I've now got a workaround but the 3 constructors for TSocketTransport seem > inconsistent. and could possibly work better. Details in the attached file. > This is the gist > > {code:java} > var host = "xyz"; > var hostAddress = "192.168.1.109"; > var port = 9090; > // NOTE: FailsNoSuchHost fails for an internal network to a hardware device > // which doesn't have a DNS entry. Nslookup returns nothing and > DNS.GetHostEntry(...) throws > // ok - there's no host entry so I guess this should fail > await FailsNoSuchHost(host, port); > // not ok - I'm specifying the IP explicitly, I don't expect this to fail > await FailsNoSuchHost(hostAddress, port); > // this works by creating an IPAddress, but is inconsistent because > // I have to explicity open the socket > await CreateAddressSucceeds(hostAddress, port); > // this works by creating a TcpClient, but I fails if I explicitly open the > socket > await CreateClientSucceeds(hostAddress, port);{code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)