Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5129

Swift TSocketTransport cannot be used to connect to client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.14.0
    • 0.14.0
    • Swift - Library

    Description

      TLDR; Swift library cannot be used to connect to a client using TSocketTransport with present code.

      In TSocketTransport init, socket IP is not set for non-linux systems, so TSocketTransport cannot be used to connect clients.

      It is set as: `in_addr(s_addr: in_addr_t(0))` in line TSocketTransport.swift 162.

      var addr = sockaddr_in(sin_len: UInt8(MemoryLayout<sockaddr_in>.size),
                             sin_family: sa_family_t(AF_INET),
                             sin_port: in_port_t(htons(UInt16(port))),
                             sin_addr: in_addr(s_addr: in_addr_t(0)),
                             sin_zero: (0, 0, 0, 0, 0, 0, 0, 0))
      

      Attachments

        Issue Links

          Activity

            People

              jensg Jens Geyer
              brakulla Caner Burak Ongay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m