Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.982.237 Times

NSFileHandleExt 1.0

  Date Added: July 07, 2010  |  Visits: 521

NSFileHandleExt

Report Broken Link
Printer Friendly Version


Product Homepage
Download (71 downloads)

NSFileHandleExt is an extension for the Objective-C/Cocoa-class NSFileHandle, which is used for handling files and sockets. NSFileHandleExt extension adds the methods +(id)fileHandleWithConnectionToHost:(NSString*)host toPort:(int)port; and -(NSString*)readLine; aswell as -(void)writeLine:(NSString*)line;, which are wrappers around the BSD-sockets. So, this allows you to use a socket efficiently. Methods: +(id)fileHandleWithConnectionToHost:(NSString*)host toPort:(int)port This method returns a new NSFileHandle after establishing a connection to the given host on the given port. If the connection could not be established, an exception will be thrown. -(NSString*)readLine This method reads a line from the socket and returns it. The end of a line is recognized by the trailing "n". -(void)writeLine:(NSString*)line Writes the given line with a trailing "rn" to the socket. Example: This example connects to port 80 of the local machine and sends an HTTP-request. The result of the server is print into the log window, afterwards the connection will be closed. NS_DURING { NSFileHandle *connection = [NSFileHandle fileHandleWithConnectionToHost:@"localhost" toPort:80]; [connection writeLine:@"GET / HTTP/1.1"]; [connection writeLine:@"Host: localhost"]; [connection writeLine:@""]; NSString *reply = [connection readLine]; while ([reply length] > 0) { NSLog(@"Got line: %@", reply); reply = [connection readLine]; } [connection closeFile]; } NS_HANDLER { NSLog(@"Error talking to server: %@", [localException reason]); } NS_ENDHANDLER Before using, you have to import the extension using #import "NSFileHandleExt.h" and add both files (NSFileHandleExt.h and NSFileHandleExt.m) to the project.. Die private Website von Michael Stapelberg mit Informationen, Programmen und Artikeln über das Programmieren sowie PC-, Mac OS X und Linux-Erfahrungen.

Requirements: No special requirements
Platforms: Linux
Keyword: Connection Extension Files Libraries Line Nsfilehandleext Nsstring Programming Sockets Used
Users rating: 0/10

License: Freeware Size: 2.05 KB
NSFILEHANDLEEXT RELATED
Programming  -  Pycco 0.1
Pocco is a Python port of Docco: the original quick-and-dirty, hundred-line-long, literate-programming-style documentation generator. It produces HTML that displays your comments alongside your code. Comments are passed through Markdown, and code...
10.24 KB  
Utilities  -  EnTalk by EnGenius 1.3
EnTalk enables user to register smartphone to EnGenius Cloud Router, the smartphone will become the extension of home line, when calls come from PSTN, smartphone can receive the calls via WiFi and 3G connection. Also smartphone can make PSTN call...
12.2 MB  
File Utilities  -  MyFolders 2.5
The free MyFolders Windows Explorer Shell Extension saves you time by placing your frequently used folders at your fingertips. Copy/Move files or Open any folder with just a few clicks!
847.33 KB  
Utilities  -  Extension Auditor for Mozilla Apps 1.1
Compare your installed Firefox or Thunderbird extensions to a directory of saved XPI extension files to see which ones need upgrading.
40.07 KB  
Programming  -  Complement 20060829
Complement is a set of C++ libraries. This libraries provide multiplatform C++ framework for multithreaded programming, sockets programming, communication programming.
102.4 KB  
File Cataloguers  -  UUMerge Freeware Edition 1.00
uuMerge Freeware Edition is a command line utility that can be used either to combine multiple text files into a single text file with a separator line between the contents of each file; or alternatively to process a 'merged' file (...
79 KB  
Development Editors  -  Alternate Textbrowser 2.2
This program makes it easy to browse through text and html/xml files, syntax highlighting for serveral programming languages is available (C++, Pascal, PHP, Perl etc.).
895 KB  
Libraries  -  Simple Sockets Library 7c
Simple Sockets Library provides a simple C programming interface to sockets. The Simple Sockets Library makes sockets easy to use and comes as public domain source code. It resembles Cs file I/O, uses whatever port is available, has named...
184.32 KB  
Programming  -  Shimari Project 2
A simple, flexible, light weight application enclosure from which rapid extension is possible in the Java programming environment. Includes the config framework similar to Apache's digester tool, except control is encapsulated in the constructor.
453.57 KB  
Web Browser Tools  -  pasteCode 0.7
pasteCode is a Thunderbird extension that allows to email highlighted programming code. Programmers: want to email some source code to a colleague and have it be actually readable and highlighted just like in your code editor? Well with...
10.24 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB