YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ClientSocket.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_CLIENTSOCKET_HPP
2
# define YAPOG_CLIENTSOCKET_HPP
3
4
# include <SFML/Network/TcpSocket.hpp>
5
6
# include "
YAPOG/Macros.hpp
"
7
# include "
YAPOG/System/Network/Socket.hpp
"
8
# include "
YAPOG/System/String.hpp
"
9
# include "
YAPOG/System/IntTypes.hpp
"
10
# include "
YAPOG/System/Time/Time.hpp
"
11
12
namespace
yap
13
{
14
struct
IPacket;
15
16
class
YAPOG_LIB
ClientSocket
:
public
Socket
17
{
18
DISALLOW_COPY
(
ClientSocket
);
19
20
public
:
21
22
ClientSocket
();
23
virtual
~
ClientSocket
();
24
25
bool
Connect (
const
String
& ipAddress,
UInt16
port);
26
void
Disconnect ();
27
28
bool
Send (
IPacket
& packet);
29
bool
Receive (
IPacket
& packet);
30
31
String
GetRemoteAddress ()
const
;
32
UInt16
GetRemotePort ()
const
;
33
34
sf::TcpSocket& GetInnerSocket ();
35
36
private
:
37
38
static
const
bool
DEFAULT_BLOCKING_STATE
;
39
static
const
Time
DEFAULT_CONNECTION_TIMEOUT
;
40
41
sf::TcpSocket
socket_
;
42
};
43
}
// namespace yap
44
45
#endif // YAPOG_CLIENTSOCKET_HPP
YAPOG
include
YAPOG
System
Network
ClientSocket.hpp
Generated on Mon Sep 17 2012 22:24:24 for YAPOG by
1.8.1.1