Clapkit
Loading...
Searching...
No Matches
ckNetClient.h
Go to the documentation of this file.
1/*
2 *
3 * Clapkit
4 * ----------------------------------------------------------------------
5 * A wrapper for creating a 'generalized' app for Classic MacOS
6 * that (hopefully) can be ported easily to other platforms.
7 *
8 * CKNetClient
9 * ----------------------------------------------------------------------
10 * Implements a basic TCP socket using MacTCP.
11 *
12 */
13
14#include "ckNetBaseSocket.h"
15#include "ckNetworking.h"
16
22
23 public:
26
27 virtual CKError Connect(const char* address, UInt16 port);
28 virtual CKError Connect(CKIPAddress address, UInt16 port);
29 virtual CKError Read(void* out, short len, short* actuallyRead);
30 virtual CKError Write(const void* data, UInt32 len);
31 bool IsConnected();
32};
std::array< unsigned char, 4 > CKIPAddress
Definition ckNetworking.h:20
Defines the base of all TCP client/server sockets.
Definition ckNetBaseSocket.h:41
Defines a client TCP socket.
Definition ckNetClient.h:21
virtual CKError Write(const void *data, UInt32 len)
Definition ckNetClient.cpp:122
~CKNetClient()
Definition ckNetClient.cpp:22
bool IsConnected()
Definition ckNetClient.cpp:162
virtual CKError Read(void *out, short len, short *actuallyRead)
Definition ckNetClient.cpp:91
CKNetClient()
Definition ckNetClient.cpp:18
virtual CKError Connect(const char *address, UInt16 port)
Definition ckNetClient.cpp:25
int32_t CKError
Return type for functions that might return an error. Also see: CKPass and CKErrorCode.
Definition ckTypes.h:26