Hi @ All,
at OpenNetworkConnection(ServerName$, Port,#PB_Network_UDP) you can select the destination Port.
But Purebasic use a random Port to send the UPD packet. It is possible to select source & destination port on a new Version ???
best Thomas
[Implemented] Source Port at UDP Network
-
- Enthusiast
- Posts: 536
- Joined: Mon Feb 16, 2009 10:42 am
- Location: sweden
- Contact:
Re: Source Port at UDP Network
What do you mean? If the port is random - how do we know what to receive and if someone is sending something? It couldnt be random, then no communication could occur? Right?
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: Source Port at UDP Network
Sure it is decided randomly by the operating system if no bind_() was called.
Here is a workaround:
http://www.purebasic.fr/german/viewtopi ... 91#p257091
You've got a source port and a destination port!
Here is a workaround:
http://www.purebasic.fr/german/viewtopi ... 91#p257091
You've got a source port and a destination port!
bye,
Daniel
Daniel
Re: Source Port at UDP Network
As for a work around, do a little search for 'winsock' on the forums.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: Source Port at UDP Network
Hello @ All
The problem is that
For Amateur Radio Packet Radio Flexnet-System works on udp
For comunication you need a fix source port on udp
for windows the work around is ok ..... but i need this word around for linux .....
so the best way is that. to implement this direct in Pure.....
best Thomas
The problem is that
For Amateur Radio Packet Radio Flexnet-System works on udp
For comunication you need a fix source port on udp
for windows the work around is ok ..... but i need this word around for linux .....
so the best way is that. to implement this direct in Pure.....
best Thomas
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: Source Port at UDP Network
The workaround also will work on linux, as Sockets on Windows and Linux are mostly equal.
bye,
Daniel
Daniel