Re: iOS https request via cellular?

2019-03-21 Thread Howard Shere

I will file an enhancement request.

But that won’t happen for a while and my code is happening now.

I only need a few simple requests. I should be able to find the right 
interface, bind to a socket and send my requests that way…unless there is 
something I don’t know which would stop that from working.


On Mar 20, 2019, at 3:26 PM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.


On 20 Mar 2019, at 20:08, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

I am working on something for a cellular carrier...

Fair enough.  My recommendation here is that you file an enhancement request 
for this feature, explaining why your HTTP request needs to run over WWAN.

<https://developer.apple.com/bug-reporting/>

Please post your bug number, just for the record.

There really isn’t a great workaround here.  If you only need to deal with very 
simple requests, you can build a bone-headed HTTP 1.1 client on top of Network 
framework (or other, older APIs), which lets your force WWAN.  If you need a 
full-featured HTTP client, the only option I can see is to write (or acquire) 
your own HTTP library )-:

Share and Enjoy
--
Quinn "The Eskimo!"<http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS https request via cellular?

2019-03-20 Thread Howard Shere

I am working on something for a cellular carrier...


On Mar 20, 2019, at 3:04 PM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.


On 20 Mar 2019, at 14:25, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

I was hoping for a way to use URLRequest to do this

Not at the `NSURLSession` level.

Why do you need this?  I’ve seen requests like this before, and I’m curious 
whether your use case is the same as the others I’ve seen (most commonly it’s 
for folks working for or with a cellular carrier, who need to make sure the 
request goes out over WWAN as part of some sort of authentication mechanism).

Share and Enjoy
--
Quinn "The Eskimo!"
<http://office365.us.vadesecure.com/safeproxy/1/dmVyc2lvbjoyfG1lc3NhZ2VJRDpBQU1rQUdOa1pqTTBNREV6TFdVd09UY3ROR0kwWlMwNFl6UmtMVE14WmprMU9EQTJaV1JqTkFCR0FBQUFBQUNQVGpzN0dLa0lRYUJjempzWnhxWGdCd0RaM0llVVk3RTJRb1ZEdFh1SGFLSVpBQUFBQUFFTkFBRFozSWVVWTdFMlFvVkR0WHVIYUtJWkFBVU1Qb3pQQUFBPXxlbWFpbEZyb206bWFjbmV0d29ya3Byb2ctYm91bmNlcytob3dhcmQuc2hlcmU9c3luY2hyb25vc3MuY29tQGxpc3RzLmFwcGxlLmNvbXxlbWFpbFRvOkhvd2FyZC5TaGVyZUBzeW5jaHJvbm9zcy5jb218bG9naW46NzAwM2EwODMtMDA3OC00OTFhLWIwYzYtMTJiMzczM2I2MTIxfGNsaWVudFR5cGU6b2ZmaWNl/www.apple.com/developer/<http://www.apple.com/developer/>>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
http://office365.us.vadesecure.com/safeproxy/2/dmVyc2lvbjoyfG1lc3NhZ2VJRDpBQU1rQUdOa1pqTTBNREV6TFdVd09UY3ROR0kwWlMwNFl6UmtMVE14WmprMU9EQTJaV1JqTkFCR0FBQUFBQUNQVGpzN0dLa0lRYUJjempzWnhxWGdCd0RaM0llVVk3RTJRb1ZEdFh1SGFLSVpBQUFBQUFFTkFBRFozSWVVWTdFMlFvVkR0WHVIYUtJWkFBVU1Qb3pQQUFBPXxlbWFpbEZyb206bWFjbmV0d29ya3Byb2ctYm91bmNlcytob3dhcmQuc2hlcmU9c3luY2hyb25vc3MuY29tQGxpc3RzLmFwcGxlLmNvbXxlbWFpbFRvOkhvd2FyZC5TaGVyZUBzeW5jaHJvbm9zcy5jb218bG9naW46NzAwM2EwODMtMDA3OC00OTFhLWIwYzYtMTJiMzczM2I2MTIxfGNsaWVudFR5cGU6b2ZmaWNl/lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com<http://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com>

This email sent to 
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: I need some feedback

2019-01-24 Thread Howard Shere

Anyone have any experience trying this out?

https://github.com/devsisters/libquic



On Jan 18, 2019, at 3:04 PM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.


On 18 Jan 2019, at 17:33, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

The code is currently using CommonCrypto …

CommonCrypto will do a good job of each specific crypto algorithm, but network 
security depends on how you assemble those algorithms into a protocol.  That’s 
very hard to do correctly, even by security experts, which is why we’re 
currently on version 1.3 of TLS.

Implementing TLS for a peer-to-peer product like this one is not without its 
challenges, but it’s still much easier than designed your own on-the-wire 
security protocol.

Share and Enjoy
--
Quinn "The Eskimo!"<http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: I need some feedback

2019-01-18 Thread Howard Shere

The code is currently using CommonCrypto, just looking at all my options before 
I rewrite the transport (which I inherited from previous developers).


On Jan 18, 2019, at 11:30 AM, Jens Alfke 
mailto:j...@mooseyard.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.



On Jan 17, 2019, at 12:26 AM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:

Finally, a question: Is there a reason you’re doing your own encryption rather 
than using TLS?  Creating your own on-the-wire crypto is very tricky, and it’s 
something best left to the experts.

+1. This is fraught with peril. When working directly with ciphers it’s easy to 
make mistakes in design that can render your encryption trivially breakable. 
Then there’s the higher-level problem of key exchange — how do the sender & 
recipient agree on a secret key before the data transfer?

If you go this route, I recommend using libSodium, an open-source 
batteries-included crypto library that provides high-level mechanisms for 
common tasks, instead of making you assemble them out of primitives. You get 
less choice of algorithms, but you do get the assurance that the functionality 
is correctly designed and implemented.

—Jens
___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: I need some feedback

2019-01-16 Thread Howard Shere

We can’t entirely stream from the files because we need to encrypt the data.

Any thoughts on using multiple threads rather than one? Or using the GPU to 
encrypt/decrypt the data?

I lean towards using a single thread unless the performance becomes limited by 
the encryption/decryption work, then multiple threads might help...


On Jan 10, 2019, at 9:58 AM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:



On 10 Jan 2019, at 15:42, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

Lots of files.

That’s likely to be the most interesting part of this.  Transferring a single 
large file over Wi-Fi is pretty straightforward: Open a TCP connection and pour 
bytes down it.  That’ll be fast and work well in a wide variety of network 
environments.  You may be able to do better with a custom transport protocol in 
some specific environments, but it’s hard to do better than TCP in general.

If you go down this path it’s a good idea to start the transfer with a header 
(including, at a minimum, the expected length) and end the transfer with a 
checksum.

IMPORTANT: You need an end-to-end checksum because, when transferring /large/ 
amounts of data, the probability of an error not being detected by the TCP 
checksum starts to rise.

The header will also allow you to support resumable transfers, which is always 
a good idea on iOS.

The specific API you use for this doesn’t really matter than much.  If you had 
a minimum deployment target of iOS 12 I’d recommend `NWConnection` but, as you 
have to support older systems, using `NSStream` is fine.

If you have multiple files to transfer then things get substantially more 
complex.  Ideally you’d want to transfer all the files over the same TCP 
connection.  The thing you want to avoid is an archive-transfer-unarchive 
approach, because the time taken for the [un]archiving could be significant.  
That means the sender needs to stream off the file system and on to the 
network, and the receiver needs to do the reverse.  This isn’t too hard but the 
devil is in the details.  For example, supporting resumable transfers with 
multiple files is going to be tricky.

You could probably find an industry-standard protocol that meets your needs, 
but that’s not always a win.  A lot of the time standard protocols tend to be 
more complex than necessary, and they’re only an advantage if you can find a 
library that implements the protocol, and that brings its own complexities.

Share and Enjoy
--
Quinn "The Eskimo!"<http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: I need some feedback

2019-01-10 Thread Howard Shere

Over wifi, but it needs to work over very busy wifi.


On Jan 10, 2019, at 9:39 AM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.


On 10 Jan 2019, at 14:48, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

I am interested in finding the fastest possible way to transfer large amounts 
of data between 2 iOS devices.

Also, what does the connectivity look like?  On the same Wi-Fi?  Both on the 
Internet?

Share and Enjoy
--
Quinn "The Eskimo!"<http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: I need some feedback

2019-01-10 Thread Howard Shere

Primarily images and videos. Multiple GBs of data.

iOS 10 and later but older versions of iOS if it doesn’t add to the 
development...


On Jan 10, 2019, at 9:38 AM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.


On 10 Jan 2019, at 14:48, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

amounts of data

Define large?  I’m not look for an exact number, just an expected order of 
magnitude.

Also, what’s you minimum deployment target?

Share and Enjoy
--
Quinn "The Eskimo!"<http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


I need some feedback

2019-01-10 Thread Howard Shere

I am interested in finding the fastest possible way to transfer large amounts 
of data between 2 iOS devices. I  can guarantee that the apps on both devices 
remain frontmost.

I can use high or low level APIs, I’ve done both in the past. I’m just looking 
fork some general feedback on what the fastest form of transport would be?


Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: URLSession GET request with http body

2018-11-13 Thread Howard Shere

this is one

https://www.elastic.co/products/elasticsearch

and another from the client I’m doing some work for. They’ve been doing it for 
years but have never had any macOS or iOS clients, curl from the command line 
handles this case and I was able to use libcurl to handle this case in my macOS 
code.

I think the problem is that the spec says “should not” instreaf of “do not” so 
many people feel that means it is optional (and I guess I’ve read that the 
“should not” part has even been removed from newer versions of the http spec...


On Nov 13, 2018, at 1:07 AM, Jens Alfke 
mailto:j...@mooseyard.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.



On Nov 12, 2018, at 5:37 PM, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

I know this is a much discussed issue on various forms (links below) but many 
RESTful APIs want GET requests with http body data even tho they probably 
shouldn't

Wow, really? That’s awful. I’ve never encountered this, but it’s definitely 
misuse of HTTP. Which APIs in particular?

—Jens

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


URLSession GET request with http body

2018-11-12 Thread Howard Shere

I know this is a much discussed issue on various forms (links below) but many 
RESTful APIs want GET requests with http body data even tho they probably 
shouldn't

I have tried this with URLSession and CFHTTPMessage with the same results: a 
timeout.

I concur with the comment in the apple forum below that this is because the 
length is being sent but then the http body data is never sent so the request 
eventually times out.

I have no problem with other GET requests and POST requests with http body data 
work fine using URLSession.

I was finally able to get a response by using libcurl (adding the http body 
changes the request type to POST, but there is a call which can change it back 
to GET), but I was hoping their was some other way to make this work with 
URLSession.

https://stackoverflow.com/questions/978061/http-get-with-request-body

https://forums.developer.apple.com/thread/67143


Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


slow wifi with bluetooth enabled?

2018-11-07 Thread Howard Shere

Anyone have any idea why wifi throughput would be significantly slower with 
bluetooth enabled? We’re seeing about a 2x slowdown when transferring data over 
https between two iOS devices if bluetooth is on.

I found this thread:

https://discussions.apple.com/thread/7685936

But no threads in developer forums.



Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: log negotiated TLS version on iOS

2018-09-05 Thread Howard Shere

Thanks!

Bug 44138932

Now I’ll try to find a way to log it from the server side (which is also an iOS 
device), hopefully that will be possible...

On Sep 5, 2018, at 9:41 AM, Quinn The Eskimo! 
mailto:eski...@apple.com>> wrote:

CAUTION: This email originated from outside of Synchronoss.


On 5 Sep 2018, at 15:28, Howard Shere 
mailto:howard.sh...@synchronoss.com>> wrote:

As the subject says, I need a way to log the negotiated TLS version in an iOS 
client app.

There isn’t a way to do that.  The ideal place for this info is 
`NSURLSessionTaskTransactionMetrics`, but it doesn’t return that specific bit 
of info, alas.  I encourage you to file an enhancement request for that.

<https://developer.apple.com/bug-reporting/>

Please post your bug number, just for the record.

ps If you use a lower-level API, like `NSStream`, you generally do have a way 
to get this info.  Alas, that won’t help if you’re using `NSURLSession`.

Share and Enjoy
--
Quinn "The Eskimo!"<http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


log negotiated TLS version on iOS

2018-09-05 Thread Howard Shere

As the subject says, I need a way to log the negotiated TLS version in an iOS 
client app. We’re currently using NSURLSession to build the client requests.

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Apple modern client/server paradigm

2018-08-06 Thread Howard Shere

I have worked with two solutions on macOS/iOS for a web server built into my 
applications.

On iOS I have used CocoaHTTPServer

https://github.com/robbiehanson/CocoaHTTPServer/tree/master/Samples/SimpleHTTPServer

and on macOS I used this:

https://github.com/cesanta/mongoose


Both would work on macOS, the advantage of CocoaHTTPServer is the structure, it 
is really easy to subclass to handle different URLs, pretty easy to use. 
Mongoose is C code, normal socket stuff.


On Aug 3, 2018, at 7:01 PM, Jens Alfke 
mailto:j...@mooseyard.com>> wrote:



On Aug 3, 2018, at 4:37 PM, Carl Hoefs 
mailto:newsli...@autonomy.caltech.edu>> wrote:

- Does one use Apache on macOS and place binaries into CGI-Executables? Or use 
something like CocoaHTTPServer to create a custom server? Or...?

I don't think Apache is even present anymore; there's no "Web Sharing" checkbox 
in the Sharing system pref.

Building a server component is nontrivial, unfortunately. The actual socket 
part is pretty easy if you use NSNetService and publish your service with the 
NSNetServiceListenForConnections option — you just have to add a delegate 
method that will be called with an NSStream input/output pair when a client 
connects.

But once you've got the socket streams, the OS doesn't help you with 
implementing any protocols. Implementing a real working HTTP server is pretty 
hard, but it's probably a lot easier to implement a dumbass one that just 
responds to one request and closes the socket (i.e. HTTP/0.9.) You can use 
CFHTTPMessage to do the header parsing/generation.

- On the iOS side, does one need only use NSURLConnection and friends? Or...?

It's NSURLSession these days.

—Jens
___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  
(Macnetworkprog@lists.apple.com<mailto:Macnetworkprog@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/howard.shere%40synchronoss.com

This email sent to howard.sh...@synchronoss.com

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


anyone have any work arounds for Error 57 : "Socket is not connected" since iOS 10

2017-02-07 Thread Howard Shere

There is a forum topic here:

https://forums.developer.apple.com/thread/67606

We have seen this with our iOS 10 app, but not with iOS 9 app. We also only see 
it with https, when we use http we have no issues. We see the same messages in 
our log as mentioned in the forum posts:


  1.  [] nw_connection_read 18 Connection is not ready, sending error callback
  2.  [] nw_connection_write_close 18 Connection is not ready, sending error 
callback
  3.  [] __tcp_connection_write_eof_block_invoke Write close callback received 
error: [57] Socket is not connected

Howard Shere | Software Sculptor
Desk: +1 CAL.LMO.BILE | Mobile: +1 901.359.4200
howard.sh...@synchronoss.com<mailto:howard.sh...@synchronoss.com>
www.synchronoss.com<http://www.synchronoss.com>

 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Any way to use wi-fi direct on iOS?

2014-11-21 Thread Howard Shere

I know I can use airplay APIs on iOS, but is there any way to use wi-fi direct 
to talk to android devices?

Howard Shere
Software Sculptor


 ___
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list  (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com