Change port numbers to avoid a clash on windows.

This commit is contained in:
chris 2003-09-16 02:56:24 +00:00
parent 511abc213e
commit 5d965babda
7 changed files with 9 additions and 9 deletions

View File

@ -10,10 +10,10 @@ class dgram_handler
public:
dgram_handler(demuxer& d)
: demuxer_(d),
socket_(d, inet_address_v4(12347)),
socket_(d, inet_address_v4(32123)),
count_(0)
{
inet_address_v4 destination(12346, "localhost");
inet_address_v4 destination(32124, "localhost");
char msg[] = "Hello, World!\n";
memcpy(data_, msg, sizeof(msg));
socket_.async_sendto(data_, sizeof(msg) - 1, destination,

View File

@ -9,7 +9,7 @@ class dgram_handler
public:
dgram_handler(demuxer& d)
: demuxer_(d),
socket_(d, inet_address_v4(12346))
socket_(d, inet_address_v4(32124))
{
socket_.async_recvfrom(data_, max_length, sender_address_,
boost::bind(&dgram_handler::handle_recvfrom, this, _1, _2));

View File

@ -71,7 +71,7 @@ public:
{
echo_session* new_session = new echo_session(demuxer_);
connector_.async_connect(new_session->socket(),
inet_address_v4(12345, "localhost"),
inet_address_v4(32123, "localhost"),
boost::bind(&echo_client::handle_connect, this, new_session, _1));
}
@ -83,7 +83,7 @@ public:
{
echo_session* new_session = new echo_session(demuxer_);
connector_.async_connect(new_session->socket(),
inet_address_v4(12345, "localhost"),
inet_address_v4(32123, "localhost"),
boost::bind(&echo_client::handle_connect, this, new_session, _1));
}

View File

@ -60,7 +60,7 @@ class echo_server
public:
echo_server(demuxer& d)
: demuxer_(d),
acceptor_(d, inet_address_v4(12345))
acceptor_(d, inet_address_v4(32123))
{
echo_session* new_session = new echo_session(demuxer_);
acceptor_.async_accept(new_session->socket(),

View File

@ -9,7 +9,7 @@ class accept_handler
public:
accept_handler(demuxer& d)
: demuxer_(d),
acceptor_(d, inet_address_v4(12345)),
acceptor_(d, inet_address_v4(32123)),
peer_(d),
handler_(boost::bind(&accept_handler::handle_accept, this, _1)),
accept_count_(0)

View File

@ -10,7 +10,7 @@ public:
dgram_handler(demuxer& d)
: demuxer_(d),
timer_queue_(d),
socket_(d, inet_address_v4(12346))
socket_(d, inet_address_v4(32124))
{
socket_.async_recvfrom(data_, max_length, sender_address_,
boost::bind(&dgram_handler::handle_recvfrom, this, _1, _2));

View File

@ -28,7 +28,7 @@ void tpc_echo_session(stream_socket_ptr sock)
void tpc_echo_server(demuxer& d)
{
socket_acceptor a(d, inet_address_v4(12345));
socket_acceptor a(d, inet_address_v4(32123));
for (;;)
{
stream_socket_ptr sock(new stream_socket(d));