Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > boost::asio (Permission denied, Connection refused)

Reply
Thread Tools

boost::asio (Permission denied, Connection refused)

 
 
wo3kie@gmail.com
Guest
Posts: n/a
 
      04-19-2008
I had not any issues with Windows, but with Linux I failed

It is going about an example from boost::asio library tutorial
# Daytime.1 - A synchronous TCP daytime client
# Daytime.2 - A synchronous TCP daytime server

After compilation, I changed access settings for files
# chmod a+x server.cpp
# chmod a+x client.cpp

and after I started a program
# ./server

I received an error message like this
# Permission denied

whilst ./client started in second terminal correctly

Fortunately small changed in server.cpp was helpful

# tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 22222 /
*13*/));

from value 13 into 22222 (as an example) (but I do not understand,
what an influance has port number for 'permision denied')

Now both server and client starts correctly
but client just after start receive another error message
# Connection refused

I have found in google issue like this, unfortunately without any
solution
http://www.unix.com/high-level-progr...-server-progra...

Thanks in advance for help,
Lukasz
 
Reply With Quote
 
 
 
 
Martin York
Guest
Posts: n/a
 
      04-20-2008
On Apr 19, 3:04 pm, "(E-Mail Removed)" <(E-Mail Removed)> wrote:
> I had not any issues with Windows, but with Linux I failed
>
> It is going about an example from boost::asio library tutorial
> # Daytime.1 - A synchronous TCP daytime client
> # Daytime.2 - A synchronous TCP daytime server
>
> After compilation, I changed access settings for files
> # chmod a+x server.cpp
> # chmod a+x client.cpp
>
> and after I started a program
> # ./server
>
> I received an error message like this
> # Permission denied
>
> whilst ./client started in second terminal correctly
>
> Fortunately small changed in server.cpp was helpful
>
> # tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 22222 /
> *13*/));
>
> from value 13 into 22222 (as an example) (but I do not understand,
> what an influance has port number for 'permision denied')
>
> Now both server and client starts correctly
> but client just after start receive another error message
> # Connection refused
>
> I have found in google issue like this, unfortunately without any
> solutionhttp://www.unix.com/high-level-programming/35804-client-server-progra...
>
> Thanks in advance for help,
> Lukasz


Off topic for C++
Try a linux group or a group dealing with sockets.

Also note that most OS reserve low port numbers for privileged
accesses (ie root or some equivalent). I am sure you will get more
exact info from a more appropriate group.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No "Wireless Network Connection" available in network connection =?Utf-8?B?am9raW5kYTE=?= Wireless Networking 7 10-16-2012 07:32 AM
Internet connection but no workgroup connection =?Utf-8?B?am9uX2p3Yg==?= Wireless Networking 2 11-28-2005 09:46 PM
ICS works with wired connection, fails with wireless connection Rich Wireless Networking 0 11-16-2005 06:48 PM
Wireless Connection drops / PS2 connection Steve Wireless Networking 1 07-27-2005 01:27 PM
Not seeing Wireless Connection in Network Connection =?Utf-8?B?bW90b21hbm1hdHQ=?= Wireless Networking 4 03-05-2005 04:39 AM



Advertisments