Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Networking & data transfer

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 460

PostPosted: Mon Apr 13, 2009 7:37 pm    Post subject: Networking & data transfer Reply with quote

iphonedevsdk.com - How to upload and download from http server?

"I'm having trouble figuring this out, or finding an easy solution. I figured out
the downloading part I think from the apple docs."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Fri Apr 17, 2009 12:37 am    Post subject: Reply with quote

Atrexis Blog - iPhone - Establishing an HTTP Connection

"I will be making a request to an image, then displaying the received image
on the screen. After that, I will save the image to the Photo album in the
iPhone."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 887
Location: Europe

PostPosted: Fri Apr 24, 2009 1:10 am    Post subject: Reply with quote

iphonedevsdk.com - Send files over socket connection

"-- want to send files to iphone over socket connection/wifi; so downloaded ASyncSocket which generates plenty of build errors related to Jam deprecated.

... trying to connect to my c++ windows socket software -- which works fine between to windows machines over port 8686.

I got this code from this forum, which so far does nada, but eventually goes to NSStreamEventErrorOccurred in the debugger:

So which port do I use? -- tried 2222; 3258; 60000; and 8686
Make the iphone the client or the server?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Wed May 20, 2009 3:06 pm    Post subject: Reply with quote

iphonedevsdk.com - Retrieving a set of data from my own webserver

"I plan to have a MySQL database on my server, from which I would query
and retrieve several different types of data. Namely, I'd be retrieving data
from CHAR (text), date, and BLOB (image) columns."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 460

PostPosted: Fri Jun 05, 2009 6:00 pm    Post subject: Reply with quote

mobileorchard.com - Tutorial: Networking and Bonjour on iPhone

"In this tutorial, we are going to explore a simple chat application for the
iPhone. It allows you to host your own chat room and advertise it on your
local Wi-Fi network (in which case your app acts as a chat “server”) or find
and join chat rooms hosted by other people on your network (acting as a
chat “client”)."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Tue Jun 09, 2009 11:38 pm    Post subject: Reply with quote

groups.google.com - iPhone ping command, howto implement? Options

"Im trying to implement unix 'ping' on the iphone
but not sure how to do it? "
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 460

PostPosted: Sat Jun 27, 2009 4:52 pm    Post subject: Reply with quote

MF - Networking with a lab instrument

"We recently received a new piece of equipment for the lab, which has a net-
work interface. Since I already have myCocoaSoftware for the analysis, why
not try to extend this to include measurements as well."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 887
Location: Europe

PostPosted: Thu Jul 09, 2009 5:58 pm    Post subject: Reply with quote

SO - How to integrate NSURLConnection with UIProgressView?

"I'm trying to integrate a NSURLConnection object with UIProgressView, so I
can update the user while a file download is happening in the background."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Wed Jul 22, 2009 2:00 am    Post subject: Reply with quote

Brian Hall - Beej's Guide to Network Programming

"Hey! Socket programming got you down? Is this stuff just a little too
difficult to figure out from the man pages? You want to do cool Internet
programming, but you don't have time to wade through a gob of structs
trying to figure out if you have to call bind() before you connect(), etc.,
etc.

Well, guess what! I've already done this nasty business, and I'm dying to
share the information with everyone! You've come to the right place. This
document should give the average competent C programmer the edge
s/he needs to get a grip on this networking noise.

And check it out: I've finally caught up with the future (just in the nick of
time, too!) and have updated the Guide for IPv6! Enjoy!"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Wed Aug 05, 2009 2:50 pm    Post subject: Reply with quote

MF - Progress bar while upload file - Code which I am using for file
upload


"NSURLConnection sendSynchronousRequest: blocks the current thread until
it completes. Either run this is a separate thread and update the UI on the
main thread or use the asychronous methods of NSURLConnection as clearly
described in the documentation."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 887
Location: Europe

PostPosted: Sat Aug 15, 2009 8:58 pm    Post subject: Reply with quote

How to Make Your iPhone App Send Email with Attachments,
by MATTJDRAKE, How to Make iPhone Apps

"In iPhone OS 3.0 you can easily send pictures and voice recordings from
your app in an email. In fact, now your emails can be easily formated using
HTML and once the user has finished the email control returns back to your
app. Pretty nifty!"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 887
Location: Europe

PostPosted: Thu Aug 20, 2009 8:46 pm    Post subject: Reply with quote

iphonedevsdk.com - Cannot HTTP POST to Server, returns empty $_POST

"You should probably implement the NSURLConnectionDelegate didFailWith-
Error method. Also, dont show your alert in didRecieveData. The data may
not all be downloaded. Instead, create an NSMutableData object and append
data in didRecieveData. Then in your didFinishLoading delegate, you can
show the alert with the full contents of the data."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sun Aug 30, 2009 11:34 pm    Post subject: Reply with quote

praveenmatanam.wordpress.com - Avoiding WiFi disconnections

* UIRequiresPersistentWiFi *

"Any iPhone application that requires a WiFi connection must set UIRequires-
PersistentWiFi to <true/>, otherwise the iPhone will abruptly disconnect the
WiFi connection after 30 minutes of use."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sun Aug 30, 2009 11:43 pm    Post subject: Reply with quote

davidjhinson.wordpress.com - iPhone Email Attachments – Revisited

"Gmail simply will not let you see embedded images. Period."

Objective-C and HTTP Basic Authentication

"Base64 encoding is used to convert binary data into text that can be trans-
mitted using HTTP (like, say, for embedding images in email) or for some-
what obfuscating user ids and passwords to be sent “in the clear” over HTTP
(like for Basic Authentication). ... And here is how one may transmit a user
id and password (using NSURLConnection) to establish a connection using
Basic Authentication"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 887
Location: Europe

PostPosted: Tue Sep 15, 2009 3:50 pm    Post subject: Reply with quote

SO - How to use bluetooth to connect two iPhone?

"I want to use iPhone SDK to implement a bluetooth connection between two
iPhones, but I don't find any bluetooth API in iPhone SDK 3.0."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sun Sep 20, 2009 2:39 am    Post subject: Reply with quote

iphonedevsdk.com - MFMailComposeViewController: image attachment

"The image is correctly displayed when I send the email, but when I receive
it the image cannot be displayed because it contains some errors."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sat Oct 03, 2009 1:45 am    Post subject: Reply with quote

adc - CFNetServiceCreate() - CFNetServices Reference

Code:
CFNetServiceRef CFNetServiceCreate (
   CFAllocatorRef alloc,
   CFStringRef    domain,
   CFStringRef    serviceType,
   CFStringRef    name,
   SInt32         port
);


"If the CFNetService is to run in asynchronous mode, call CFNetService-
SetClient to prepare the service for running in asynchronous mode. Then
call CFNetServiceScheduleWithRunLoop to schedule the service on a run
loop. Then call CFNetServiceRegister to make the service available."


Last edited by delovski on Sat Oct 03, 2009 2:22 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sat Oct 03, 2009 2:22 am    Post subject: Reply with quote

adc - CFSocketSetAddress() - CFSocket Reference

Code:
CFSocketError CFSocketSetAddress (
   CFSocketRef s,
   CFDataRef   address
);


"Binds a local address to a CFSocket object."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sat Oct 03, 2009 2:27 am    Post subject: Reply with quote

adc - CFSocketCopyAddress() - CFSocket Reference

Code:
CFDataRef CFSocketCopyAddress (
   CFSocketRef s
);


"The local address, stored as a struct sockaddr in a CFData object, of s."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sat Oct 03, 2009 3:06 am    Post subject: Reply with quote

iphonedevsdk.com - CFNetwork Memory Leak

"There is a 3.5k leak that's been reported quite a bit related to networking.
Is that what you're seeing? It's an OS bug. There's no workaround."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Thu Jan 21, 2010 1:05 am    Post subject: Reply with quote

MF - How to code a network application

"Basically what im trying to do is have the iPhone act as a 'client' and
connect to a OSX application 'server'."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Fri Jan 22, 2010 9:08 am    Post subject: Reply with quote

MF - Bonjour, NSStream and Multicast

"I need to send the same data to a whole heap of iPhones at once (potenti-
ally thousands) from a single Mac. These iPhones are all on the same wire-
less network."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 887
Location: Europe

PostPosted: Wed Feb 17, 2010 9:03 pm    Post subject: Reply with quote

MF - Gamekit API

"I know I can't connect because of limitations of the iPhone simulator, but
what I do know is that the simulator detects available peers and you can
see the name in the GKPeerPickerViewController interface."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sun Mar 21, 2010 11:11 pm    Post subject: Reply with quote

SO - BSD Sockets don’t behave in a iPhone 3G environment

"The CFStream Socket Additions are what Apple recommends you use
instead of the direct BSD sockets."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sun Mar 28, 2010 9:09 pm    Post subject: Reply with quote

MF - Simple Network Code

"Use AsyncSocket: http://code.google.com/p/cocoaasyncsocket/

It's pretty easy to work with, if you have some Cocoa skills. The first time
I used it, I was very new to Cocoa and Objective-C, but quite experienced
with Java and other programming languages. I had it interoperating with
Java networking apps in only a few days worth of playing with it."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Mon Apr 19, 2010 12:17 am    Post subject: Reply with quote

zachwaugh - Programmatically Retrieving IP Address of iPhone

"There are some undocumented methods that work ([NSHost addresses]),
but I didn’t want to risk them pulling that out of there and my app breaking.
So I wrote some C code (cobbled together from various sources) that will
loop through the network interfaces and retrieve the IP address."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Wed May 05, 2010 4:57 pm    Post subject: Reply with quote

Jeff LaMarche - NSStream: TCP and SSL

"The way that we enable SSL encryption is to simply use setProperty:forKey:
on both streams, setting the key NSStreamSocketSecurityLevelKey to a
value that specifies the version of SSL to use. If you want to tell NSStream
to use the highest version supported in common with the remote connection,
specify NSStreamSocketSecurityLevelKey. That's what you'll usually want."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Mon May 24, 2010 6:23 pm    Post subject: Reply with quote

so - iPhone SDK: Storing username and password in the code

"If this is FTP, then you are sending the credentials over the network unen-
crypted. If you expect to protect these credentials, you've already lost,
because anyone with any interest can easily sniff the password off of the
wireless network."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Mon May 24, 2010 11:31 pm    Post subject: Reply with quote

Jeff LaMarche - Downloading Images for a Table without Threads

"I've written a small iPhone app that downloads images from Deviant Art.
You just enter somebody's Deviant Art username into a text field and the
application will grab the the images in that person's gallery, download them
asynchronously, and display each one in the table once it's finished down-
loading."


Nice comments: Neil Mix, Chris Gummer, plus more by Jeff:

"Have you actually gotten the application to crash by hitting the back but-
ton? I haven't. I think your reasoning misses an important point: NSURL-
Connection is one of the few classes that actually retains its delegate. As
long as the request is active, the delegate won't go anywhere.

The documentation does not make this point obvious, but it is easy to con-
firm by checking the retain count in the debugger."


Last edited by delovski on Thu Aug 05, 2010 10:35 pm; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 887
Location: Europe

PostPosted: Mon Jun 28, 2010 1:27 pm    Post subject: Reply with quote

MF - Using POST method to get the cookies(by clicking button)

"And then the user has to click a button to submit the data through the
url POST method and then the cookies of the website will be return to
the application. There are some http 302 (redirect) or 303 in some of
the website."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Thu Jul 29, 2010 11:55 pm    Post subject: Reply with quote

so - iPhone : upload image to web aspx file

"I have a little problem. I have to upload a photo from my iPhone to a web
server with POST Method but the server file is in aspx. I tried my code with
my server and PHP file : works well ! Now with aspx file : doesn't upload..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Sat Jul 31, 2010 12:07 am    Post subject: Reply with quote

iphonedevsdk.com - Sending JSON to a URL

"So, for instance if my remote database is called 'SportsData', located at
http://www.website.com, with tables 'event' and 'user' and I want to send
it the following query."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 2142
Location: Zagreb

PostPosted: Thu Aug 05, 2010 9:36 pm    Post subject: Reply with quote

so - Handling redirects correctly with NSURLConnection

"The idea here is that instead of cloning the new request and trying to shape
it the same as the one Cocoa Touch sends me, I create a clone of the origi-
nal request and change just the URL to match the request Cocoa Touch sent
me."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 460

PostPosted: Tue Aug 24, 2010 5:44 pm    Post subject: Reply with quote

http://stackoverflow.com/questions/3554180/nsurlconnection-connectiondidfinishloading-called-before-all-file-is-downloaded
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group