This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jarle212's profile picture

LANing / cable communication API

Started by Jarle212, 31 March 2013 - 05:02 AM
Jarle212 #1
Posted 31 March 2013 - 07: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
InDieTasten #2
Posted 31 March 2013 - 06: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
theoriginalbit #3
Posted 31 March 2013 - 06:58 PM
you can use

rednet.open("side")
for bundled cables
you actually cannot use bundled cables for rednet in CC1.5+
InDieTasten #4
Posted 01 April 2013 - 04:15 PM
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…
MudkipTheEpic #5
Posted 01 April 2013 - 04:21 PM
rednet.broadcast is not implemented to work with bundled cables… It got removed right before networking cables.
Edited on 01 April 2013 - 03:02 PM
theoriginalbit #6
Posted 01 April 2013 - 04:30 PM
but it is as i said already built in…
It is not "built" in, in the newer versions…
InDieTasten #7
Posted 01 April 2013 - 04:55 PM
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.
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
theoriginalbit #8
Posted 01 April 2013 - 04:58 PM
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……..
MudkipTheEpic #9
Posted 01 April 2013 - 05:02 PM
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.
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…
InDieTasten #10
Posted 01 April 2013 - 05:21 PM
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* ;)/>
InDieTasten #11
Posted 01 April 2013 - 05:24 PM
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.
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* ;)/>
Jarle212 #12
Posted 06 April 2013 - 07: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 :)/>
shazbot #13
Posted 06 April 2013 - 08: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.
Jarle212 #14
Posted 06 April 2013 - 09:54 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.
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]
LBPHacker #15
Posted 06 April 2013 - 11:17 PM
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.
Jarle212 #16
Posted 07 April 2013 - 08:01 AM
:P/>