src/Network/TCP.hh
author Tero Marttila <terom@fixme.fi>
Fri, 16 Jan 2009 22:03:49 +0200
changeset 400 d64bf28c4340
parent 381 9b35bc329d23
permissions -rw-r--r--
more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
     1
#ifndef NETWORK_TCP_HH
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
     2
#define NETWORK_TCP_HH
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
     3
400
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
     4
/**
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
     5
 * @file
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
     6
 *
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
     7
 * Simple message-based TCP implementation
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
     8
 */
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
     9
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    10
#include <ClanLib/core.h>
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    11
186
0738f2949a2b move src/Network% to src/Network/%
terom
parents: 185
diff changeset
    12
#include "Socket.hh"
0738f2949a2b move src/Network% to src/Network/%
terom
parents: 185
diff changeset
    13
#include "Address.hh"
0738f2949a2b move src/Network% to src/Network/%
terom
parents: 185
diff changeset
    14
#include "Packet.hh"
200
2dbf40661580 better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents: 186
diff changeset
    15
#include "Buffer.hh"
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    16
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    17
// @{
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    18
/**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    19
 * Initial input/output buffer size given to NetworkTCPTransport::in/out constructor
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    20
 *
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    21
 * @see NetworkBufferBase
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    22
 */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    23
const size_t NETWORK_TCP_INITIAL_IN_BUF = 4096;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    24
const size_t NETWORK_TCP_INITIAL_OUT_BUF = 0;
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    25
// @}
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    26
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    27
/**
400
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
    28
 * A connected TCP socket, so either a client or a server's accept'd socket. Can be used to send/receive messages.
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
    29
 *
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
    30
 * Not instanted directly, use NetworkTCPServer/NetworkTCPClient.
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
    31
 *
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
    32
 * Most of the functionality is present in NetworkSocket/NetworkBuffer*, so mostly this just implements the
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
    33
 * higher-level logic for reading messages, triggering signals, driving connect/listen and maintaing the poll flags.
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    34
 */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    35
class NetworkTCPTransport {
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    36
    protected:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    37
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    38
         * The SOCK_STREAM socket
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    39
         */
378
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    40
        NetworkSocket *socket;
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    41
        
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    42
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    43
         * Our input buffer associated with socket
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    44
         */
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    45
        NetworkBufferInput in;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    46
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    47
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    48
         * Our output buffer associated with socket
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    49
         */
200
2dbf40661580 better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents: 186
diff changeset
    50
        NetworkBufferOutput out;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    51
    
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    52
        CL_SlotContainer slots; 
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    53
    
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    54
    public:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    55
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    56
         * Construct this using the given socket
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    57
         */
378
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    58
        NetworkTCPTransport (NetworkSocket *socket);
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    59
        
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    60
        /**
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    61
         * Deletes the socket
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    62
         */
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    63
        ~NetworkTCPTransport (void);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    64
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    65
    private:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    66
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    67
         * Triggered when the socket is read for recv
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    68
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    69
        void on_read (void);
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    70
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    71
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    72
         * Triggered when the socket is read for send
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    73
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    74
        void on_write (void);
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    75
        
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    76
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    77
         * The packet-read signal
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    78
         */
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    79
        CL_Signal_v1<NetworkPacketInput&> _sig_packet;
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    80
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    81
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    82
         * The disconnected-signal
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    83
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    84
        CL_Signal_v0 _sig_disconnect;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    85
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
    86
    public:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    87
        /**
378
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
    88
         * Get this TCP socket's local address
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    89
         */
380
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 378
diff changeset
    90
        NetworkAddress get_local_address (void) { return socket->get_local_address(); }
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    91
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    92
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    93
         * Get this TCP socket's remote address
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    94
         */
380
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 378
diff changeset
    95
        NetworkAddress get_remote_address (void) { return socket->get_remote_address(); }
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    96
        
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    97
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    98
         * Write the given packet to this socket output, buffering the data if need be
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
    99
         *
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   100
         * @param packet the packet to send
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   101
         */
200
2dbf40661580 better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents: 186
diff changeset
   102
        void write_packet (const NetworkPacketBuffer &packet);
380
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 378
diff changeset
   103
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 378
diff changeset
   104
        /**
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 378
diff changeset
   105
         * Handle disconnect, disable socket
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 378
diff changeset
   106
         */
d193dd1d8a7e new NetworkReactor, fix everything to actually work
terom
parents: 378
diff changeset
   107
        void handle_disconnect (void);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   108
        
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   109
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   110
         * A full packet has been received from the remote end
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   111
         */
200
2dbf40661580 better NetworkBuffer/Packet stuff + some additional Physics+Network stuff + random fixes
terom
parents: 186
diff changeset
   112
        CL_Signal_v1<NetworkPacketInput&>& sig_packet (void) { return _sig_packet; }
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   113
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   114
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   115
         * The connection has been lost (no specific error code given)
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   116
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   117
        CL_Signal_v0& sig_disconnect (void) { return _sig_disconnect; }
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   118
};
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   119
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   120
/**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   121
 * A TCP server, listening on the given address, creating NetworkTCPTransports for clients that connect
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   122
 */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   123
class NetworkTCPServer {
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   124
    private:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   125
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   126
         * The listen() socket
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   127
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   128
        NetworkSocket socket;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   129
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   130
        CL_SlotContainer slots; 
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   131
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   132
    public:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   133
        /**
400
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
   134
         * Listen on the specific endpoint for incoming client connections. \a listen_addr may be a hostname, a
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
   135
         * suitable address will be chosen.
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   136
         */
381
9b35bc329d23 separate sockaddr stuff out of NetworkAddress... now called NetworkEndpoint
terom
parents: 380
diff changeset
   137
        NetworkTCPServer (const NetworkEndpoint &listen_addr);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   138
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   139
    private:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   140
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   141
         * The socket is read for read()
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   142
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   143
        void on_accept (void);
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   144
        
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   145
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   146
         * The on_accept signal
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   147
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   148
        CL_Signal_v1<NetworkTCPTransport *> _sig_client;
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   149
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   150
    protected:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   151
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   152
         * Called by on_accept to build the NetworkTCPTransport, can be used to override what class gets used.
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   153
         *
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   154
         * By default, this just constructs a new NetworkTCPTransport and returns it
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   155
         *
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   156
         * @param socket the socket returned by accept()
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   157
         */
378
5589abf5e61b break the network code. Too late to set up a branch for this now
terom
parents: 286
diff changeset
   158
        virtual NetworkTCPTransport* buildTransport (NetworkSocket *socket);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   159
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   160
    public:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   161
        /**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   162
         * A new client has connected, and a NetworkTCPTransport has been connected for it
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   163
         */
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   164
        CL_Signal_v1<NetworkTCPTransport *>& sig_client (void) { return _sig_client; }
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   165
};
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   166
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   167
/**
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   168
 * A TCP Client that connects to the given address
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   169
 */ 
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   170
class NetworkTCPClient : public NetworkTCPTransport {
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   171
    public:
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   172
        /**
400
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
   173
         * Create a NetworkTCPTransport, and then connect our socket to the given remote endpoint
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
   174
         *
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
   175
         * This is address-family-agnostic, and fully supports endpoints with multiple addresses. They will be tried in
d64bf28c4340 more documentation tweaking, all Network/ files now have a @file comment. Fix Platform.h -> Platform.hh, and Buffer.hh + Packet.cc
Tero Marttila <terom@fixme.fi>
parents: 381
diff changeset
   176
         * turn until one works.
286
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   177
         *
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   178
         * @param connect_addr the address to connect to
2a8f20a53ff2 more network documentation
terom
parents: 200
diff changeset
   179
         */
381
9b35bc329d23 separate sockaddr stuff out of NetworkAddress... now called NetworkEndpoint
terom
parents: 380
diff changeset
   180
        NetworkTCPClient (const NetworkEndpoint &connect_addr);
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   181
};
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   182
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff changeset
   183
#endif /* NETWORK_TCP_HH */