FAQ  •  Register  •  Login

Spectranet

<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Mon Nov 17, 2014 2:15 pm

Re: Spectranet

Hi B.

Could You add.

%connect
%control

And so one so I could do something like this.

  Code:
10 %connect #4,"SITE WWW",PORT
20 %control #5
25 print #4;"0"
30 print #5;"p"
40 input #5;a;a$
.....
thank you.

I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Wed Nov 19, 2014 2:58 pm

Re: Spectranet

I really need this :)
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Fri Nov 28, 2014 7:18 am

Re: Spectranet

:?
I'm always on the chat or facebook.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Nov 28, 2014 10:03 am

Re: Spectranet

ardentcrest wrote::?

Hi Arden!

Can you use the current spectralib for this?
The syntax is no longer %open for example.
Instead you have to open a conection with:
  Code:
10 %connect #4,"SITE WWW",PORT


Try instead:
  Code:
#include <spectranet.bas>
conn = SNETconnect(socket , "IP", port)


The spectralib is poooooorly documented. If you happen to find more doc, then I could speed up it's development.
At the moment, the functions there are the only ones used for networking.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Fri Nov 28, 2014 10:28 am

Re: Spectranet

Winston said you can use poll instead of %connect #5

http://spectrum.alioth.net/doc/index.php/Poll
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Fri Nov 28, 2014 10:37 am

Re: Spectranet

tried above code

  Code:
#include <spectranet.bas>

conn = SNETconnect(4 , "127.0.0.1", 16384)


got this

spectranet.bas:67: warning: FUNCTION 'SNETbind' declared as FASTCALL with 2 parameters
spectranet.bas:94: warning: FUNCTION 'SNETconnect' declared as FASTCALL with 3 parameters

 11:02:46 -> Done: Compilation successfull
 11:02:46 -> FAIL: Compiler cannot write output file in directory (Protected Or does Not exist?)
 11:02:46 -> Compilation time: 13432ms
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Mon Dec 08, 2014 9:31 pm

Re: Spectranet

HELP......

 21:29:53 -> Compilation starts(4 Lines)
 21:29:53 -> Source D:\ZXBasicCompiler\IDE\new.bor saved
 21:29:53 -> D:\ZXBasicCompiler\zxb.exe "temp.bor" -S 24200 -o "D:\ZXBasicCompiler\IDE\Test.bin"

 21:30:06 -> Exit code: 0

spectranet.bas:67: warning: FUNCTION 'SNETbind' declared as FASTCALL with 2 parameters
spectranet.bas:94: warning: FUNCTION 'SNETconnect' declared as FASTCALL with 3 parameters
spectranet.bas:121: warning: FUNCTION 'SNETrecv' declared as FASTCALL with 3 parameters
spectranet.bas:133: warning: FUNCTION 'SNETsend' declared as FASTCALL with 3 parameters
spectranet.bas:291: warning: FUNCTION 'SNETfread' declared as FASTCALL with 3 parameters
spectranet.bas:315: warning: FUNCTION 'SNETfwrite' declared as FASTCALL with 3 parameters
spectranet.bas:382: warning: FUNCTION 'SNETfseek' declared as FASTCALL with 3 parameters
temp.bor:4: warning: Using default implicit type 'byte' for 'conn'

 21:30:06 -> Done: Compilation successfull
 21:30:06 -> FAIL: Compiler cannot write output file in directory (Protected Or does Not exist?)
 21:30:06 -> Compilation time: 13089ms
I'm always on the chat or facebook.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Mon Dec 08, 2014 9:35 pm

Re: Spectranet

ardentcrest wrote:HELP......

 21:29:53 -> Compilation starts(4 Lines)
 21:29:53 -> Source D:\ZXBasicCompiler\IDE\new.bor saved
 21:29:53 -> D:\ZXBasicCompiler\zxb.exe "temp.bor" -S 24200 -o "D:\ZXBasicCompiler\IDE\Test.bin"

 21:30:06 -> Exit code: 0

spectranet.bas:67: warning: FUNCTION 'SNETbind' declared as FASTCALL with 2 parameters
spectranet.bas:94: warning: FUNCTION 'SNETconnect' declared as FASTCALL with 3 parameters
spectranet.bas:121: warning: FUNCTION 'SNETrecv' declared as FASTCALL with 3 parameters
spectranet.bas:133: warning: FUNCTION 'SNETsend' declared as FASTCALL with 3 parameters
spectranet.bas:291: warning: FUNCTION 'SNETfread' declared as FASTCALL with 3 parameters
spectranet.bas:315: warning: FUNCTION 'SNETfwrite' declared as FASTCALL with 3 parameters
spectranet.bas:382: warning: FUNCTION 'SNETfseek' declared as FASTCALL with 3 parameters
temp.bor:4: warning: Using default implicit type 'byte' for 'conn'

 21:30:06 -> Done: Compilation successfull
 21:30:06 -> FAIL: Compiler cannot write output file in directory (Protected Or does Not exist?)
 21:30:06 -> Compilation time: 13089ms


This is related to the IDE. Apparently the compiler cannot write the output program for whatever reason.
Try using the compiler from the command line, or contact LCD for this. :wink:
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Dec 09, 2014 1:45 pm

Re: Spectranet

I give up :cry: :cry: :cry:
I'm always on the chat or facebook.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Tue Dec 09, 2014 1:55 pm

Re: Spectranet

ardentcrest wrote:I give up :cry: :cry: :cry:


You can compile your program from the command line with:
  Code:
zxb -taB yourprogram.bas
and use the .tap file.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Dec 09, 2014 2:12 pm

Re: Spectranet

  Code:
10 %connect #4,"the8bitmud.zapto.org",16384
20 %control #5
25 print #4;chr$ 0
30 print #5;"p"
40 input #5;a;a$
50 if a=4 and a$="recv" then goto 200
60 let k$=inkey$
70 if k$="" then goto 40
71 if code k$=12 then print #4;chr$ 8;:print chr$ 8;" ";chr$ 8;: goto 40
75 print #4;k$;: printk$;
80 pause 50: goto 40
200 let s$=inkey$#4: if code s$=13 then print '
201 if code s$ > 127 then goto 40
202 if code s$ < 32 then goto 40
210 print s$


above into this


  Code:
#include <spectranet.bas>



30 conn1 = SNETconnect(4 , "the8bitmud.zapto.org", 16384)
SNETaccept(4)

40 poke 60000,0
50 send1 = SNETsend(4,60000,1)


64 t = SNETlisten(4)
65 p = SNETrecv(4, 60002,1)

70 print p;

80 goto 64
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Fri Dec 12, 2014 10:47 am

Re: Spectranet

Nope still cant get anywhere :(
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Sat Dec 13, 2014 12:30 pm

Re: Spectranet

Any one :(
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Dec 30, 2014 10:22 am

Re: Spectranet

Hours of fun, and still cant get it dome :(
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Fri Jan 16, 2015 2:30 pm

Re: Spectranet

Hours of fun, and still cant get it done. part two :(
I'm always on the chat or facebook.
PreviousNext

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO