Jump to content




LANing / cable communication API

api

  • You cannot reply to this topic
15 replies to this topic

#1 Jarle212

  • Members
  • 198 posts
  • LocationNorway

Posted 31 March 2013 - 06:02 AM

This is an API I made that will allow CCcomputers to comunicate safely(not too much use because of the laning cable), or for CCcomputers to connect to forth or other hardware.

LanAPI: http://pastebin.com/sisCipkP

Chat room using the API (peer to peer) : http://pastebin.com/r3PsAFjG

#2 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 31 March 2013 - 05:51 PM

well....pretty cool program but i don't get the point of this.
i mean, your LANApi isn't bad but it's kind of already built in the game. you can use
rednet.open("side")
for bundled cables as well and send/receive messages over these:
--send
fileHandle = fs.open("path", "r")
content = fileHandle.readAll()
fileHnadle.close()
rednet.open("side")
rednet.send(ip/id, content)
rednet.close()
--receive
rednet.open("side")
content = rednet.receive(timeoutValue)
rednet.close()
fileHandle.open("path","w")
fileHandle.write(content)
fileHandle.close()
it does the same as the example in your documentation without any additional API. because the rednet API already supports communication over bundled cables

#3 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 31 March 2013 - 05:58 PM

View PostInDieTasten, on 31 March 2013 - 05:51 PM, said:

you can use
rednet.open("side")
for bundled cables
you actually cannot use bundled cables for rednet in CC1.5+

#4 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 01 April 2013 - 03:15 PM

View Posttheoriginalbit, on 31 March 2013 - 05:58 PM, said:

View PostInDieTasten, on 31 March 2013 - 05:51 PM, said:

you can use
rednet.open("side")
for bundled cables
you actually cannot use bundled cables for rednet in CC1.5+
yeah, because redpower isn't updated to Minecraft 1.5, yet. but his LANing api is using them to communicate over the redstone api with .setBundledOutput "manually". so he uses bundled cables. and he did such a good job creating a programm that is able to transfer data bit-by-bit over a bundled-cable. but it is as i said already built in...

#5 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 01 April 2013 - 03:21 PM

rednet.broadcast is not implemented to work with bundled cables... It got removed right before networking cables.

Edited by MudkipTheEpic, 01 April 2013 - 04:02 PM.


#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 01 April 2013 - 03:30 PM

View PostInDieTasten, on 01 April 2013 - 03:15 PM, said:

but it is as i said already built in...
It is not "built" in, in the newer versions...

#7 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 01 April 2013 - 03:55 PM

View PostMudkipTheEpic, on 01 April 2013 - 03:21 PM, said:

rednet.broadcast IS NOT IMPLEMENTED to work with bundled cables... It got removed right before networking cables.
okay. sorry. i thought it was just because there are no bundled cables available for computercraft 1.5+. and man, no need of caps-lock here.

View Posttheoriginalbit, on 01 April 2013 - 03:30 PM, said:

View PostInDieTasten, on 01 April 2013 - 03:15 PM, said:

but it is as i said already built in...
It is not "built" in, in the never versions...
yeah, i got the message ;)
but it was possible in the version he created this for. because it makes even less sense to communicate over bundled cables with the new network cables

#8 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 01 April 2013 - 03:58 PM

View PostInDieTasten, on 01 April 2013 - 03:55 PM, said:

but it was possible in the version he created this for. because it makes even less sense to communicate over bundled cables with the new network cables
how do you know what version he created this for? i don't see any mention of a CC version anywhere........

#9 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 01 April 2013 - 04:02 PM

View PostInDieTasten, on 01 April 2013 - 03:55 PM, said:

View PostMudkipTheEpic, on 01 April 2013 - 03:21 PM, said:

rednet.broadcast IS NOT IMPLEMENTED to work with bundled cables... It got removed right before networking cables.
okay. sorry. i thought it was just because there are no bundled cables available for computercraft 1.5+. and man, no need of caps-lock here.

View Posttheoriginalbit, on 01 April 2013 - 03:30 PM, said:

View PostInDieTasten, on 01 April 2013 - 03:15 PM, said:

but it is as i said already built in...
It is not "built" in, in the never versions...
yeah, i got the message ;)
but it was possible in the version he created this for. because it makes even less sense to communicate over bundled cables with the new network cables

I did not think that would make you mad.. removed...

#10 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 01 April 2013 - 04:21 PM

View Posttheoriginalbit, on 01 April 2013 - 03:58 PM, said:

View PostInDieTasten, on 01 April 2013 - 03:55 PM, said:

but it was possible in the version he created this for. because it makes even less sense to communicate over bundled cables with the new network cables
how do you know what version he created this for? i don't see any mention of a CC version anywhere........
eeeehm, i thought the answere to this question is answered my reply: "because it makes even less sense to communicate over bundled cables with the new network cables"
ok, it's not exactly shown here, for what version this is for, but i was brazenly enough to say that it doesn't make any more sense to use bundled cables for communicating in the new versions. the networking cables are faster and have more features. and they are cheaper in all modpacks i can remember compared to the bundled cables. but you're right. i just found some more ways to defend my first post, so yeah, you won and stuff like this. *voting your posts up* ;)

#11 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 01 April 2013 - 04:24 PM

View PostMudkipTheEpic, on 01 April 2013 - 04:02 PM, said:

View PostInDieTasten, on 01 April 2013 - 03:55 PM, said:

View PostMudkipTheEpic, on 01 April 2013 - 03:21 PM, said:

rednet.broadcast IS NOT IMPLEMENTED to work with bundled cables... It got removed right before networking cables.
okay. sorry. i thought it was just because there are no bundled cables available for computercraft 1.5+. and man, no need of caps-lock here.

View Posttheoriginalbit, on 01 April 2013 - 03:30 PM, said:

View PostInDieTasten, on 01 April 2013 - 03:15 PM, said:

but it is as i said already built in...
It is not "built" in, in the never versions...
yeah, i got the message ;)
but it was possible in the version he created this for. because it makes even less sense to communicate over bundled cables with the new network cables

I did not think that would make you mad.. removed...
i just don't like caps-lock. it doesn't made me mad at all. but really reasonable your reaction to this. *vote up* ;)

#12 Jarle212

  • Members
  • 198 posts
  • LocationNorway

Posted 06 April 2013 - 06:11 AM

Well, it was made for sending cryptation keys for safe rednet comunication or comunication with redpower hardware(or other mods using redpower) :D

Edit: If your friend (and by any chanse he has made a program that can read input from bundlecable in forth) likes forth computers more than CC computers. You could send messages between a CC computer and a redpower forth computer :)

#13 shazbot

  • Members
  • 3 posts

Posted 06 April 2013 - 07:19 AM

Yeah don't pay attention to any naysayers. This is both awesome and useful. :)

I was actually thinking of making something just like this myself for a totally different reason... overcoming the distance limitations of wireless modems through the use of wireless redstone transmitters. Basically, with this API I will not have to write any of that code myself! Congratulations... you just made it possible for me to create a server-wide internet.

#14 Jarle212

  • Members
  • 198 posts
  • LocationNorway

Posted 06 April 2013 - 08:54 AM

View Postshazbot, on 06 April 2013 - 07:19 AM, said:

Yeah don't pay attention to any naysayers. This is both awesome and useful. :)

I was actually thinking of making something just like this myself for a totally different reason... overcoming the distance limitations of wireless modems through the use of wireless redstone transmitters. Basically, with this API I will not have to write any of that code myself! Congratulations... you just made it possible for me to create a server-wide internet.
Good to hear that someone can make use of this :D Thank you!


Edit: [off topic] why is Google online in the first page of the forum? [/off topic]

#15 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 06 April 2013 - 10:17 PM

View PostJarle212, on 06 April 2013 - 08:54 AM, said:

Edit: [off topic] why is Google online in the first page of the forum? [/off topic]
That's a bot. That's why it has a different color and you can't view it's profile.

#16 Jarle212

  • Members
  • 198 posts
  • LocationNorway

Posted 07 April 2013 - 07:01 AM

:P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users