Page 1 of 1
[Implemented] Source Port at UDP Network
Posted: Mon Jun 06, 2011 3:39 pm
by Joshua314
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
Re: Source Port at UDP Network
Posted: Mon Jun 06, 2011 4:41 pm
by jesperbrannmark
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?
Re: Source Port at UDP Network
Posted: Mon Jun 06, 2011 5:01 pm
by DarkDragon
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!
Re: Source Port at UDP Network
Posted: Fri Jun 10, 2011 7:34 am
by blueznl
As for a work around, do a little search for 'winsock' on the forums.
Re: Source Port at UDP Network
Posted: Sat Jun 11, 2011 4:31 pm
by Joshua314
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
Re: Source Port at UDP Network
Posted: Sat Jun 11, 2011 6:16 pm
by DarkDragon
The workaround also will work on linux, as Sockets on Windows and Linux are mostly equal.