summaryrefslogtreecommitdiff
path: root/include/pso/TTcpSocket.h
blob: aef01b25a8e81fe8e6eb61024f432e7046aeeaa0 (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
#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/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:
	TTcpSocket(TObject *parent) : TSocket(parent) {
		m_name = TTcpSocket_name;
	}

	virtual ~TTcpSocket();

	virtual int open();
	virtual short close();
	virtual void recv();
	virtual short send(u8 *data);
	virtual short send(u8 *data, size_t size);

	short stat();
	void some_stub();
	int test_connection();

	static void notify(short size, short sock_fd);
};

#endif