Network: GetServerPort()
Posted: Sat Sep 20, 2008 4:33 pm
Hi developers of PureBASIC,
I use PureBASIC now for 3 weeks and I'm deeply impressed.
Thank you!
Now to my wish(list):
I'm coming from the network side and so I always have to write programs
which has something todo with ethernet.
One of my last tries with PureBASIC was to implement a tftp client.
I thought that this is not a big deal with PureBASIC.
But: It is not possible (If I'm ,as Newbie, not wrong)
The reason is, that the tftp server accepts data packets on port 69 only
for starting a session. Than the client has to reply on the port which was used by the first answer of the server.
But at the moment it is impossible to figure out this port.
So a function GetServerPort() would be nice.
And I don't want to use the windows API, since one of the reasons why I use PureBASIC is, that I need portable programs (windows and linux).
Please look also here for a better explanation of the problem:
http://www.purebasic.fr/english/viewtop ... p&start=15
With GetServerPort() it would be possible to close the connection,
open a new one with the received port and BINGO!
Best regards,
infratec
I use PureBASIC now for 3 weeks and I'm deeply impressed.
Thank you!
Now to my wish(list):
I'm coming from the network side and so I always have to write programs
which has something todo with ethernet.
One of my last tries with PureBASIC was to implement a tftp client.
I thought that this is not a big deal with PureBASIC.
But: It is not possible (If I'm ,as Newbie, not wrong)
The reason is, that the tftp server accepts data packets on port 69 only
for starting a session. Than the client has to reply on the port which was used by the first answer of the server.
But at the moment it is impossible to figure out this port.
So a function GetServerPort() would be nice.
And I don't want to use the windows API, since one of the reasons why I use PureBASIC is, that I need portable programs (windows and linux).
Please look also here for a better explanation of the problem:
http://www.purebasic.fr/english/viewtop ... p&start=15
With GetServerPort() it would be possible to close the connection,
open a new one with the received port and BINGO!
Best regards,
infratec