Questions tagged [nsstream]

NSStream is an abstract class for objects representing streams.

NSStream is an abstract class for objects representing streams. Its interface is common to all Cocoa stream classes, including its concrete subclasses NSInputStream and NSOutputStream.

NSStream objects provide an easy way to read and write data to and from a variety of media in a device-independent way.

For more information : NSStream Class Reference

327 questions
0
votes
1 answer

Opening socket connection in background and allowing different controllers to read and write from the stream in Objective-C

First of all - I am newbie at iOS 6 programming. I am trying to open a socket connection to remote server when application starts, and run it in some background thread. I have a class - NetworkCommunication.h, and 3 view controllers which I would…
Tomasz Łoś
  • 79
  • 2
  • 10
0
votes
1 answer

How many events does multiple writes to NSOutputStream result in?

Do two writes to the NSOutputStream result in two NSStreamEventHasBytesAvailable (where I handle the data read) in stream:handleEvent:?
Boon
  • 40,656
  • 60
  • 209
  • 315
0
votes
0 answers

Socket Programming in iOS, how to receive and send data the same time

I hope someone can help me out. I have two applications (one server, one client). The client sends an image to the server via a socket connection. Everything works fine but I have one question. Once the server receives the image packages, I want…
Pascal
  • 315
  • 5
  • 22
0
votes
0 answers

How can I tell what was successfully written before a socket connection closes?

I'm working on a network service and would like to be able to recover from dropped connections by caching the output I was trying to send so I can resend it when the client reconnects to the service. My service is using NSOutputStream wrapping a…
Greg
  • 10,360
  • 6
  • 44
  • 67
0
votes
1 answer

iOS: sending .jpg image as base64 to tcp server

This one is going to kill me. I'm so close to getting this done except for this one stupid problem. And I am not sure I will be able to adequately describe the problem, but I'll try. My enterprise app uses the iPhone camera to take pictures of…
Bill Norman
  • 883
  • 11
  • 29
0
votes
0 answers

socket connection in iOS and background tasks

I am designing an app that needs to exchange data in real time over network and I am planning to use socket connection to achieve this. To keep the socket connection open in background I plan to declare my app as a VOIP app (I already know apple's…
DonDyck
  • 1,451
  • 5
  • 20
  • 35
0
votes
1 answer

How to stream video capture between devices like video chat in iphone sdk?

Hi i want to make an app which does video calling between iOS devices .I have studied about opentok and idoubs but i want to do it myself from starting. I searched a lot but could not find any solution . I tried to achieve that in a way i think how…
sajwan
  • 333
  • 3
  • 14
0
votes
1 answer

NSStream vs. NSURLConnection simultaneous open TCP

I still need an understanding of these things, anyway, does NSStream or NSURLConnection support multiple open TCP, say for example, www.xyz.com port:4040 www.xyz.com port:5050 www.xyz.com port:5150 This is a only one host. Which of the two can…
mirageservo
  • 2,387
  • 4
  • 22
  • 31
0
votes
1 answer

Which method is called when socket is disconncted

Can anybody know which method is called when socket is automatically disconneted in NSStreamDelegate ? Because when socket is disconnected then its will again called - (void)stream:(NSStream *)theStream handleEvent:(NSStreamEvent)streamEvent method…
Nrml
  • 31
  • 3
0
votes
2 answers

ios socket programming - NSStream not working

I am using a device called a WiFly that has ip address:169.254.1.1 and port 2000. I am trying to connect to this device via an iOS application. I use the following code to connect: CFReadStreamRef readStream; CFWriteStreamRef writeStream; UInt32…
thebiglebowski11
  • 1,451
  • 10
  • 41
  • 76
0
votes
1 answer

Send messages from server to iOS app

I am very new to web technologies, but have been developing for iphone for 3 years. I need to send a message from a server I rent to my app. Not a "push notification" for the user, but for the app itself. How should I do this?
Jake Dahl
  • 171
  • 2
  • 3
  • 13
0
votes
1 answer

performSelector:OnThread:waitUntilDone not executing the selector all the time

I have an app where the network activity is done in its separate thread (and the network thread continuously gets data from the server and updates the display - the display calls are made back on the main thread). When the user logs out, the main…
R.S
  • 321
  • 3
  • 15
0
votes
3 answers

Destroy and Rebuild Singleton iOS

i am currently developing an application for iOS which needs to communicate with a hardware device using a Socket Connection. Therefore i am using a Singleton Object with NSStream. To this point all works as expected. The problem is if the…
0
votes
1 answer

iPhone SSID Check is Unreliable

My application requires the user's iPhone to be connected to a 3rd party hardware device which broadcasts an SSID containing the Product Name (always the same) followed by a Unit Number (i.e. ProductName_123); essentially a Captive Network. Before…
John Hall
  • 1,346
  • 13
  • 27
0
votes
1 answer

iOS network on background thread causes application to hang

I have an application that creates a background thread for the network messages. The application works nearly perfectly unless the server it connects to closes the connection. I am unsure of why this happens but any advice is greatly appreciated.…
Seb
  • 3,414
  • 10
  • 73
  • 106
1 2 3
21
22