ftp.nice.ch/pub/next/connectivity/conferences/IRC.0.5.NIHS.bs.tar.gz#/IRC/TCPConnection.h

This is TCPConnection.h in view mode; [Download] [Up]

/*
 *	IRC.app -- IRC client program for NEXTSTEP
 *	Copyright (C)1995 Norihiro Itoh
 *
 *	このソースはIRC.appの一部です。
 *	This file is part of IRC.app.
 *
 *	本プログラムはフリー・ソフトウェアです。あなたは、Free Software 
 *	Foundationが公表したGNU一般公有使用許諾の「バージョン2」或いは
 *	それ以降の各バージョンの中からいずれかを選択し、そのバージョンが
 *	定める条項に従って本プログラムを再頒布または変更することができま
 *	す。
 *	This program is free software; you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation; either version 2 of the License, or
 *	(at your option) any later version.
 *
 *	本プログラムは有用とは思いますが、頒布にあたっては、市場性及び特
 *	定目的適合性についての暗黙の保証を含めて、いかなる保証も行ないま
 *	せん。詳細についてはGNU一般公有使用許諾書をお読みください。
 *	This program is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	あなたは、本プログラムと一緒にGNU一般公有使用許諾の写しを受け取っ
 *	ているはずです。そうでない場合は、Free Software Foundation, Inc.,
 *	675 Mass Ave, Cambridge, MA 02139, USAへ手紙を書いてください。
 *	You should have received a copy of the GNU General Public License
 *	along with this program; if not, write to the Free Software
 *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *	作者のメールアドレス: nito@scorpio.bekkoame.or.jp
 *	Author's e-mail address: nito@scorpio.bekkoame.or.jp
 */	

#import	<sys/types.h>
#import	<sys/socket.h>
#import	<netdb.h>

#import <appkit/appkit.h>


#define	TCP_CONNECTED		(1)

#define	TCP_UNKNOWN_HOST	(-101)
#define	TCP_CONNECT_FAILED	(-102)


@interface TCPConnection:Object
{
    int			sock;
    
    NXStream		*stream;
}

- init;

- (int)connectTo:(char *)hostname by:(u_short)port;
- (int)sendData:(char *)buffer sizeOf:(int)length;
- (int)receiveData:(char *)buffer sizeOf:(int)length;
- (int)receiveLine:(char *)buffer;

-(int)getFD;

- shutDown;
- close;
- shutDownAndClose;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.