1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* Copyright (c) 2008
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of libobjfw. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#import <stdio.h>
#import <sys/types.h>
#import <sys/socket.h>
#import <netdb.h>
#import "OFObject.h"
#import "OFStream.h"
/**
* The OFTCPSocket class provides functions to create and use sockets.
*/
@interface OFTCPSocket: OFObject <OFStream>
{
int sock;
struct sockaddr *saddr;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* Copyright (c) 2008
* Jonathan Schleifer <js@webkeks.org>
*
* All rights reserved.
*
* This file is part of libobjfw. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE included in
* the packaging of this file.
*/
#import <stdio.h>
/*
* Headers for UNIX systems
*/
#ifndef _WIN32
#import <sys/types.h>
#import <sys/socket.h>
#import <netdb.h>
#else
#endif
#import "OFObject.h"
#import "OFStream.h"
/*
* Headers for Win32
*
* These must be imported after objc/Object and thus OFObject!
*/
#ifdef _WIN32
#import <winsock2.h>
#import <ws2tcpip.h>
#endif
/**
* The OFTCPSocket class provides functions to create and use sockets.
*/
@interface OFTCPSocket: OFObject <OFStream>
{
int sock;
struct sockaddr *saddr;
|