Comments (5)
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.
@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.
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.
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.
@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)
- 'thrift --gen swift_3 thrift_file' not working HOT 4
- [noob question] where is the thrift binary? HOT 7
- Thrift not compiles on Xcode 8 HOT 4
- Swift 4 support? HOT 7
- Swift-Nio lightweight HTTPServer implementation HOT 2
- Swift 4.1: '_rawValue' is inaccessible due to 'private' protection level HOT 4
- Bug in TFileTransport.read(size:)? HOT 3
- Let all socket communication go through a 3rd party library.
- /opt/local/dev/Thrift-Swift: error: package at '/opt/local/dev/Thrift-Swift' is using Swift tools version 3.1.0 which is no longer supported; use 4.0.0 or newer instead HOT 2
- Using Swift 4.2 with Thrift
- how to make rpc call via TAsyncClient HOT 6
- Contributing
- question on getting started with clients HOT 1
- TJSONProtocol support to Thrift-Swift package HOT 1
- Deploy new release with latest updates
- Invalid redeclaration of 'description' / tag 1.0.7 HOT 2
- Enum failable initialization / tag 1.0.7 HOT 2
- Enum property access level / tag 1.0.7 HOT 2
- optional keyword is ignored in argument lists HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thrift-swift.