Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-06-2013, 14:35   #16
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

night0wl, et al...

Before you ask, yes I am using SO_REUSEADDR for the TCP server socket...

Maybe this is broken in the wxMac network stack.

Dave
bdbcat is offline   Reply With Quote
Old 04-06-2013, 15:29   #17
Registered User

Join Date: Dec 2007
Posts: 177
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Quote:
Originally Posted by bdbcat View Post
night0wl...

Something a bit odd on Mac, alright.

I find that TCP output works if you set the connection address to
0.0.0.0 (which is the same as "AnyAddress" in netspeak).

For some reason the Mac network stack will not bind (i.e. open) a server if the port is set to the physical port of the server itself. But linux seems to be able to do this.

This makes a little bit of sense; in OCPN, if the TCP connection is set as output, then O acts as a server. So he should be listening for connecitons from "anything on the specified port, e.g.10110", so to speak.

Any networking gurus are welcome to chime in with insight here. My understanding of TCP/IP is vague, especially when it doesn't work...

Anyway, please try this (0.0.0.0) and report back. If it works, I will make some adjustments to the OCPN TCP network code.

Thanks
Dave
You were absolutely right to suspect this was the issue!!!

For test, I connected to Frisco AIS on one inet connection. Then, I changed the broadcast TCP server to 0.0.0.0 and set it for repeat. This was the result (all as expected)




Then, I had my second mac (mountain lion w/3.2.2) connect to the snow leopard mac running 3.2.2 and this was the result....SUCCESS!!!




Wooo hooo! Even if this is a bug, Im very happy it all works. Great tip to use 0.0.0.0 as the IP of the TCP server!!!
night0wl is offline   Reply With Quote
Old 05-06-2013, 03:45   #18
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 513
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Quote:
Originally Posted by bdbcat View Post
For some reason the Mac network stack will not bind (i.e. open) a server if the port is set to the physical port of the server itself. But linux seems to be able to do this.

This makes a little bit of sense; in OCPN, if the TCP connection is set as output, then O acts as a server. So he should be listening for connecitons from "anything on the specified port, e.g.10110", so to speak.
I believe any POSIX system should be able to bind to a particular address if it is local and there's loads of instances where you'd want to do that: mail servers or ssh servers you don't want listening on all interfaces, or maybe you've got an Internet facing interface on your laptop that you don't want OpenCPN listening for connections on?

Just confirmed that kplex can happily bind to a local address (rather than INADDR_ANY) on MacOS 10.4 so maybe it's a wx problem?
muttnik is offline   Reply With Quote
Reply

Tags
opencpn


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 Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 03:01.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.