Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Misc > Re: 1980 Basic ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 35 of 51 Topic 1442 of 1492
Post > Topic >>

Re: 1980 Basic Sought

by "Auric__" <not.my.real@[EMAIL PROTECTED] > Apr 10, 2008 at 03:43 PM

On Wed, 09 Apr 2008 23:42:45 GMT,  wrote:

> On Wed, 9 Apr 2008 21:58:24 +0000 (UTC), "Auric__"
> <not.my.real@[EMAIL PROTECTED]
> wrote:
>
> <snip>
>>PowerBasic is a direct descendant of Borland TurboBasic. PB/DOS can
>>run TB programs unaltered, and *most* QB programs that don't use 
>>database-specific keywords without change, but almost without 
>>exception, VB programs require *some* degree of rewriting to work 
>>under PB/Win. There are some things that PB can do better than VB
>>-- most notably network comms, which are handled exactly like files
>>-- while it's considerably easier to do forms in VB. (PB forms are
>>a pain in the ass.)
>
> Well, I was thinking of eventually adding networking capibilities
> to the OPEN statement in BCET.  Something like:
>
> OPEN "<network address or name(:****t)> for TCP as #1
> OPEN "<network address or name(:****t)> for UDP as #1
>
> The first would act like text mode and you could use PRINT & INPUT
> OR LINE INPUT with it.
>
> The second would probably act more like a RANDOM or BINARY file and
> probably use GET & PUT.  Haven't quite decided on this yet.   Maybe
> better to treat both the same.

My previous statement was slightly off; PB/Win (and probably PB/CC32, 
but probably *not* PB/DOS) only has TCP and UDP sup****t built in, and 
it's not *exactly* like files, but similar. (I haven't thought about 
it in a couple of years.) You do it like this (from the helpfile):
  TCP OPEN {****T p& | srvc$} AT host$ AS [#] fNum& [TIMEOUT val&]
  TCP OPEN SERVER [ADDR ip&] {****T p& | srvc$} AS [#] fNum& [TIMEOUT _
    val&]
  UDP OPEN [****T p&] AS [#] fNum& [TIMEOUT val&]

For a FAQ autoposter I wrote a few years ago, the connection line was 
something like this:
  TCP OPEN "nntp" at server$ as #1

You send with TCP SEND and UDP SEND, receive with TCP RECV and UDP 
RECV, close with TCP CLOSE and UDP CLOSE, and there's a few other 
related commands.

For other protocols, you'd have to do it like anywhere else -- and it 
looks like OCX controls under PB are somewhat more difficult than VB.

> The problem is if you have multiple channels open at the same time
> waiting for a packet to show up, how does one know which channel to
> read from next?  Need something like select except that keyword is
> already used. :-)

I don't know. PB/Win handles it by assigning different file handles to 
each connection, and I assume that they're wrappers for Winsock calls, 
which should (in theory) worry about that sort of thing for you.

-- 
I don't follow that logic.
 




 51 Posts in Topic:
1980 Basic Sought
david.williams@[EMAIL PRO  2008-03-14 09:56:13 
Re: 1980 Basic Sought
winston19842005 <bjjly  2008-03-14 10:23:56 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-03-14 09:35:58 
Re: 1980 Basic Sought
winston19842005 <bjjly  2008-03-14 10:45:09 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-03-14 11:06:08 
Re: 1980 Basic Sought
ArarghMail803NOSPAM@[EMAI  2008-03-14 18:09:14 
Re: 1980 Basic Sought
"Tom Lake" <  2008-03-14 21:29:01 
Re: 1980 Basic Sought
ArarghMail803NOSPAM@[EMAI  2008-03-14 22:58:33 
Re: 1980 Basic Sought
"R.Nicholson" &  2008-04-08 11:20:03 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-08 23:27:54 
Re: 1980 Basic Sought
"news@[EMAIL PROTECT  2008-04-10 01:29:14 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-10 04:19:38 
Re: 1980 Basic Sought
"R.Nicholson" &  2008-04-10 10:53:00 
Re: 1980 Basic Sought
"Stephen J. Rush&quo  2008-04-08 03:29:05 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-08 04:44:07 
Re: 1980 Basic Sought
thomas.mertes@[EMAIL PROT  2008-04-07 01:50:52 
Re: 1980 Basic Sought
"Tom Lake" <  2008-04-07 07:55:55 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-07 18:43:27 
Re: 1980 Basic Sought
"Tom Lake" <  2008-04-07 21:22:26 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-07 21:20:53 
Re: 1980 Basic Sought
"Tom Lake" <  2008-04-07 23:08:17 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-08 00:21:08 
Re: 1980 Basic Sought
"Tom Lake" <  2008-04-08 04:35:55 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-08 04:45:15 
Re: 1980 Basic Sought
"Tom Lake" <  2008-04-08 08:29:29 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-04-08 08:33:38 
Re: 1980 Basic Sought
"Tom Lake" <  2008-04-08 15:29:56 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-08 23:18:16 
Re: 1980 Basic Sought
"Auric__" <n  2008-04-09 20:21:32 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-09 15:36:54 
Re: 1980 Basic Sought
"Auric__" <n  2008-04-09 20:40:42 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-09 16:35:42 
Re: 1980 Basic Sought
"Auric__" <n  2008-04-09 21:58:24 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-09 18:42:45 
Re: 1980 Basic Sought
"Auric__" <n  2008-04-10 15:43:33 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-04-09 17:20:01 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-09 18:58:15 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-04-10 09:20:41 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-10 21:54:34 
Re: 1980 Basic Sought
"R.Nicholson" &  2008-04-08 21:51:43 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-09 02:52:08 
Re: 1980 Basic Sought
"Bill Leary" &l  2008-04-09 07:02:03 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-09 07:22:45 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-04-09 08:35:22 
Re: 1980 Basic Sought
ArarghMail804NOSPAM@[EMAI  2008-04-09 09:21:04 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-04-09 10:01:21 
Re: 1980 Basic Sought
"Bill Leary" &l  2008-04-10 01:17:20 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-03-14 09:32:59 
Re: 1980 Basic Sought
Charmed Snark <snark@[  2008-03-14 16:04:19 
Re: 1980 Basic Sought
"Judson McClendon&qu  2008-03-14 13:49:57 
Re: 1980 Basic Sought
Charmed Snark <snark@[  2008-03-15 04:11:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 20 15:09:50 CDT 2008.