blob: 8e9055871d9197428bf004636779dee7e34784e0 (
plain)
| 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
44
45
 | 
#ifndef TTCPSOCKET_H
#define TTCPSOCKET_H
#include <global_types.h>
#include <string.h>
#include <pso/macros.h>
#include <pso/forward.h>
#include <pso/PSOV3EncryptionTCP.h>
#include <pso/TArray.h>
#include <pso/TSocket.h>
#include <pso/TObject.h>
EXTERN_OBJECT_NAME(TTcpSocket);
extern TTcpSocket *tcp_socket_table[16];
class TTcpSocket : public TSocket {
public:
	PSOV3EncryptionTCP m_send_crypt;
	PSOV3EncryptionTCP m_recv_crypt;
	int m_is_encrypted;
public:
	WEAK_FUNC TTcpSocket(TObject *parent) : TSocket(parent) {
		m_name = TTcpSocket_name;
	}
	virtual ~TTcpSocket();
	virtual short open() override;
	virtual short close() override;
	virtual void recv() override;
	virtual short send(u8 *data) override;
	virtual int send(u8 *data, size_t size) override;
	short stat();
	void some_stub();
	int test_connection();
	static void notify(short size, short sock_fd);
	PRIVATE_MEMBER_ACCESSORS(PSOV3EncryptionTCP, send_crypt);
	PRIVATE_MEMBER_ACCESSORS(PSOV3EncryptionTCP, recv_crypt);
	PRIVATE_MEMBER_ACCESSORS(int, is_encrypted);
};
#endif
 |