It is currently Thu Nov 21, 2019 10:05 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Differences in interpretation of native PB network code.
PostPosted: Tue Oct 16, 2012 1:09 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:50 am
Posts: 796
Location: Bradenton, FL
http://www.purebasic.fr/english/viewtopic.php?f=37&t=51317&p=393516#p393516
In the above thread, Fred makes the statement:

Quote:
ReceiveNetworkData() should be called only after a #PB_NetworkEvent_Data, every other use is wrong.

I believe that this statement is incorrect, as it precludes the most efficient use of sockets in threads, and it also does not allow for persistent socket connections. I may not have as much experience as others with PureBasic, but I have 20 years experience with sockets. If we are going to convince Fred that he was mistaken in his analysis of the prior thread, I will need others to express their opinion on the subject.

Rich


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 9:06 am 
Offline
Addict
Addict

Joined: Tue Feb 22, 2011 1:16 pm
Posts: 1482
It's not incorrect, because that's the way data has been made to work in PureBasic. It may not be "correct", but it's the way it's been implemented in PureBasic, so you need to follow what the instructions say to use it the way PureBasic expects.

_________________
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 10:35 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13628
Location: France
It's the way it was designed. If you need more control, you can use the socket API, it's not that complicated (if you have 20 years of XP in sockets, it shouldn't be a problem)

BTW: putting my name in a thread topic isn't correct and won't change anything.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 5:41 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 212
Location: Slovenia
Are you skeptic ? Ask Fred ^^.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 5:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:50 am
Posts: 796
Location: Bradenton, FL
Please don't talk to me as if I were born last night. Yes, you do a very good job, and yes, I am thankful, as I've demonstrated by my multiple donations. But don't think for a moment that I, and others are mindless lemmings, marching to your beat. Yes, I have 20 years experience in sockets, and yes, it's not a problem for me (as I have demonstrated by posting socket code with the windows API.)

That experience you so blithely dismiss was something that I thought might be useful to you and the product. Apparently I was wrong in thinking that my suggestions, if considered, and made native, might help those who work on other platforms. My apologies for thinking that you might not know absolutely everything.

One more thing, don't presume to know what I was thinking when I put your name in the thread topic. My only goal was to make sure you saw it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 6:03 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 212
Location: Slovenia
RichAlgeni wrote:
Please don't talk to me as if I were born last night. Yes, you do a very good job, and yes, I am thankful, as I've demonstrated by my multiple donations. But don't think for a moment that I, and others are mindless lemmings, marching to your beat. Yes, I have 20 years experience in sockets, and yes, it's not a problem for me (as I have demonstrated by posting socket code with the windows API.)

That experience you so blithely dismiss was something that I thought might be useful to you and the product. Apparently I was wrong in thinking that my suggestions, if considered, and made native, might help those who work on other platforms. My apologies for thinking that you might not know absolutely everything.

One more thing, don't presume to know what I was thinking when I put your name in the thread topic. My only goal was to make sure you saw it.


Third to half of the post is braging of your skill, please calm your head.

And as Fred said, you allways can use Win Api instead...


Last edited by Primoz128 on Tue Oct 16, 2012 6:09 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 6:08 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:50 am
Posts: 796
Location: Bradenton, FL
Quote:
Third to half of the post is braging of your skill, please calm your head.


So Priimoz128, you would only accept suggestions from the inexperienced? My bad.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 6:10 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 212
Location: Slovenia
You don't get it do you ?
It's USE the way PB was made or use Win Api, or gtfo raging or crying.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 6:14 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:50 am
Posts: 796
Location: Bradenton, FL
You're about as helpful as tits on a bull Primoz.

What is the purpose of the forums? This might be over your head.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 6:18 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 212
Location: Slovenia
Your a lost case, not gona bother anymore.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 6:20 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:50 am
Posts: 796
Location: Bradenton, FL
Promise???? :lol:


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 6:56 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:50 am
Posts: 796
Location: Bradenton, FL
Look Primoz128, I apologize to you for being a dick, it's something that comes to easy to me. It's just that I don't appreciate being patronized about something I feel strongly about. I don't know nor do I use 2D or 3D, so I don't post about it. I do know sockets, I have experience in using them, and thought this experience could be helpful to others, and Purebasic.

I can understand if someone says 'that's just not the direction we are going in at this time', or 'we have other priorities right now.'

MachineCode said:
Quote:
It's not incorrect, because that's the way data has been made to work in PureBasic

This whole thing started with ReceiveNetworkData() returns -1, when it should be 0.

If that's not wrong, what is?

I don't have a dog in this fight anymore, as I don't make the decisions on what happens with PB. I felt strongly about this subject, and therefore I had to speak up. Others have a differing opinion. I can work around the issue with no problems using windows code. I consider the issue settled.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Tue Oct 16, 2012 7:09 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 10, 2011 8:25 pm
Posts: 212
Location: Slovenia
Receiving -1 might just be easier to some people... positive (received) = 1; negative (not received) = -1, 0 might seem weird to some... it's Pure BASIC(for begginers...)


Top
 Profile  
Reply with quote  
 Post subject: Re: Fred, I believe you are mistaken on this...
PostPosted: Wed Oct 17, 2012 10:55 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Apr 24, 2012 5:08 pm
Posts: 542
Location: Ontario, Canada
Primoz128 wrote:
Receiving -1 might just be easier to some people... positive (received) = 1; negative (not received) = -1, 0 might seem weird to some... it's Pure BASIC(for begginers...)


Zero seems perfectly normal to me, since in most languages zero means false, and anything else means true.

Returning -1 to mean false is what's confusing, but unfortunately that's the way PB works.

_________________
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan


Top
 Profile  
Reply with quote  
 Post subject: Re: Oh mighty and powerful Oz, I believe you are mistaken on
PostPosted: Wed Oct 17, 2012 11:46 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 22, 2010 1:50 am
Posts: 796
Location: Bradenton, FL
The problem Boris is that the socket is still connected, nothing is received, yet -1 is returned.

But, 'he who shall not be named in thread titles' has ruled, it is what it is.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye