Git Product home page Git Product logo

Comments (5)

wyland avatar wyland commented on September 26, 2024

You should be able to configure the socket protocol here using IPPROTO_UDP / SOCK_DGRAM instead of IPPROTO_TCP / SOCK_STREAM for the server. Although you will likely need to come up with a different Transport to read/write on that protocol.

If you can get this working, feel free to submit a pull request with some options.

from thrift-swift.

seivan avatar seivan commented on September 26, 2024

@wyland Sure, I'll be implementing the service first to have something to try against.
One concern is that UDP doesn't work that well on iOS devices as the hardware might sleep, I am trying to figure out how to wake it up. Apple docs recommends not to go with low level POSIX code and instead using CFSocket which you guys seem to be doing, I am just trying to wrap my head around how to kickstart the device to start sending the packages. Do you got any experience with UDP on iOS - or more specifically, UDP across cellular connections?

from thrift-swift.

seivan avatar seivan commented on September 26, 2024

Another note, I am wondering if it were to be a better solution to "outsource" the socket stuff to a third party library like IBM/BlueSocket.

from thrift-swift.

wyland avatar wyland commented on September 26, 2024

Unfortunately we rely on TCP and don't have any personal experience using UDP. As long as you conform to TTransport, I don't believe you will run into any issues using a third party like BlueSocket as your client to a thrift service.

from thrift-swift.

seivan avatar seivan commented on September 26, 2024

@wyland I am not saying replacing TCP with UDP, I am asking if the internal implementation regarding socket communication (regardless of TCP/UDP) would be better served and simplified by using a layer on top that tackles all the cruft.

The way I see it, handling all edge cases regarding networking should be "outsourced" to a library which main concern is just that.

The reason is, if I add support for UDP, I don't trust myself to know enough to make it good enough compared to an existing solution that tackles that.

from thrift-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.