Questions tagged [cfstream]

51 questions
2
votes
2 answers

Issues with MonoTouch and CFStream API

I am currently developing an application that needs to communicate with a MQTT server via a socket connection. As the System.Net.Sockets API tends to misbehave when switching from a WiFi network to a 3G network (and this happens quite a lot…
AlexB
  • 726
  • 4
  • 13
1
vote
1 answer

Is it possible to read from/write to a device through CFStream?

I would like to take advantage of CFStream on Mac OS X to be able to read/write asynchronously to a file descriptor that is a serial communication device. I need access to the file descriptor so that I can control and change the device settings…
1
vote
0 answers

How to connect with wifi network using IP Address in iOS?

First of all i will explain what i want to achieve. I have a WIFI Bridge. Now right now I'm connected with that bridge via iPhone device. I can see the name of wifi bridge by going into setting and select wifi. Now from here I want to get connect…
Sourav Mishra
  • 501
  • 4
  • 21
1
vote
0 answers

How to fix leak of SocketStream with service type set to VoIP?

Xcode reporting SocketStream object is leaking after streams closing. Leak is reliably reproducible on iPhone, but not on Simulator or Mac. Streams are created with CFStreamCreatePairWithSocketToCFHost, then used, closed and released, leaving…
Sergei Ousynin
  • 170
  • 2
  • 13
1
vote
1 answer

FTP Directory name with spaces not accessible in iOS programmatically

I have to access the folder name with spaces, but I am getting 550 error which means file does not exist. ftp://192.xxx.xx.x/C/xxx/xxxx/xxx xxx xxx/5mb.jpg I can access directories upto this path ftp://192.xxx.xx.x/C/xxx/xxxx/ But after that, as…
Jas_meet
  • 366
  • 1
  • 20
1
vote
1 answer

Objective C TCP Socket

I am trying to get my head around the objective c tcp socket to connect to server, I've used the code from those two tutorials: https://www.raywenderlich.com/3932/networking-tutorial-for-ios-how-to-create-a-socket-based-iphone-app-and-server and…
geef
  • 65
  • 1
  • 2
  • 8
1
vote
1 answer

CFStreamCreateBoundPair can not free

I use CFStreamCreateBoundPair to create a pair of stream in order to upload a large file.The code is like below. let readStreamPointer = UnsafeMutablePointer?>.alloc(1) let writeStreamPointer =…
Xingxing
  • 580
  • 1
  • 6
  • 17
1
vote
1 answer

Finding IP address of windows local hostname on iOS

I am trying to find the IP of a windows computer (named TEST) on a local wifi network on iOS for smb purposes. I have bonjour installed on this windows machine and if i type the following command in terminal on my mac(on the same wifi network): ping…
Oht
  • 409
  • 5
  • 19
1
vote
1 answer

Objective c - Writing image file to ip address

Experts: I've been researching all morning on how to write an image file to another computer via IP Address. Do I really need to create sockets, set delegates, schedule a run loop, check space available, and all that hoopla? Really? Can't I just…
Patricia
  • 5,019
  • 14
  • 72
  • 152
1
vote
2 answers

iOS send command to web server

All, I have an OBDII device which has a webserver in it. I connect via wifi. I want to create an app to send commands and read the data received from the device. I first test it using Terminal. I connect using a telnet session and can send a command…
RobertvdBerg
  • 187
  • 2
  • 14
1
vote
0 answers

CFStreamCreatePairWithSocketToHost Only Works With Localhost

I'm using CFStreamCreatePairWithSocketToHost to create a socket connection between my server and the iPhone. However, I am finding that this only works with localhost, not with a public ip address or URL. If I run my application in the iOS…
Charles
  • 4,372
  • 9
  • 41
  • 80
1
vote
0 answers

CFReadStreamCreateWithFTPURL() crashing when i change the url

I am using the following code for load list from any ftp server: self.networkStream = CFBridgingRelease( CFReadStreamCreateWithFTPURL(NULL, (__bridge CFURLRef) url) ); assert(self.networkStream != nil); //[self.networkStream…
1
vote
2 answers

Compare kCFFTPResourceType to number

I am writing an FTP download system, the the listing function: NSLog(@"%@", listDir.filesInfo); I see my files on server: { kCFFTPResourceGroup = group; kCFFTPResourceLink = ""; kCFFTPResourceModDate = "2012-11-04 15:49:00 +0000"; …
DanM
  • 1,530
  • 4
  • 23
  • 44
1
vote
1 answer

Appending data to a file on a FTP server in iOS

After learning the basics from Apple's SimpleFTPSample project, I'm trying to append a string to the end of a .txt file on my FTP server. I successfully managed to overwrite an existing file with a custom string, but I suspect that the…
Sagiftw
  • 1,658
  • 4
  • 21
  • 25
1
vote
0 answers

Error domain NSPOSIXErrorDomain on app resume

My app needs to refresh content on resume. I am using CFStream API to connect to our servers. A few times, I get the NSPOSIXErrorDomain error with error code 9, when the app resumes even though there is an internet connection. Is there anything…
8suhas
  • 1,460
  • 11
  • 20