OpenNetworkConnection() IPv6 bind address and port

Just starting out? Need help? Post your questions and find answers here.
infratec
Always Here
Always Here
Posts: 6883
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

OpenNetworkConnection() IPv6 bind address and port

Post by infratec »

Hi,

I just wrote my first code which have to set a specific outgoing port and network ip address for IPv6.
And I failed.

In my case OpenNetworkConnection() have only success when I leave the last to optional values empty.
Or

Code: Select all

OpenNetworkConnection("xxx:xxx:xx:xx::x", 5060, #PB_Network_UDP|#PB_Network_IPv6, "", 0)
this is working too.

As soon as I set a LocalPort and/or a LocalIP$ it fails.
I tried all available IPv6 addresses.

Somebody who had success :?:

Code: Select all

InitNetwork()

Con = OpenNetworkConnection("google.com", 80, #PB_Network_UDP|#PB_Network_IPv6, 1000, "", 0)
If Con
  Debug "Ok"
  CloseNetworkConnection(Con)
Else
  Debug "Failed"
EndIf



Con = OpenNetworkConnection("google.com", 80, #PB_Network_UDP|#PB_Network_IPv6, 1000, "", 10001)
If Con
  Debug "Ok"
  CloseNetworkConnection(Con)
Else
  Debug "Failed"
EndIf
Bug or no bug :?:

I'm on Win10 x64 with PB 5.70B2 x86

Bernd
infratec
Always Here
Always Here
Posts: 6883
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: OpenNetworkConnection() IPv6 bind address and port

Post by infratec »

Just saw that even when OpenNetworkConnection() works and SendNetworkString() returns Ok too, I see no UDP packet in Wireshark.

So ... had someone already success with IPv6 :?:

Bernd
User avatar
langinagel
Enthusiast
Enthusiast
Posts: 131
Joined: Fri Jan 28, 2005 11:53 pm
Location: Germany
Contact:

Re: OpenNetworkConnection() IPv6 bind address and port

Post by langinagel »

Hi,
I would say BUG !

Why? I have 2 PCs connected via a switch. The Demo-programs
NetworkServer.pb and
NetworkClient.pb

run fine when conne3cted per default on IPv4.

I tried it with IPv6, also with your hint

Code: Select all

  ConnectionID = OpenNetworkConnection("fexxxxxxxxxxxxxxc3", Port, #PB_Network_IPv6| #PB_Network_TCP,1000, "",0)
and still failed.
The "fail" is: "yes there is some connection with OpenNetwork(), be happy" on the Client side, but no reaction on the server side. I think OpenNetwork does not cover all kind of possible faults.
Both PC run Ubuntu 20.04, yours failed on Windows, so this looks like a buggy library.

Timo ?

Cheers
LN
https://www.doerpsoft.org

Boost. Work. Efficiency.
Post Reply