#402
Posted 04 November 2015 - 05:35 PM
#403
Posted 04 November 2015 - 05:55 PM
dan200, on 04 November 2015 - 05:25 PM, said:
In the latest CC version you can only send but not receive headers.
#404
Posted 04 November 2015 - 06:37 PM
dan200, on 04 November 2015 - 05:25 PM, said:
Any chance we can get websockets?
#405
Posted 04 November 2015 - 06:38 PM
Lignum, on 04 November 2015 - 06:37 PM, said:
dan200, on 04 November 2015 - 05:25 PM, said:
Any chance we can get websockets?
I second this. Websockets are insanely useful when you don't want to have HTTP headers flying around 20 times per second. A practical application for them would be a multiplayer game that works across servers - get a socket.io server running on node.js, then CC clients can freely connect. It would also be nice if SSL websockets were supported - the latest maven version of java-websocket does not support them but the latest jar on git does.
Edit: (also computercraft RTM slack client :3)
Edited by LemonLake, 04 November 2015 - 06:39 PM.
#406
Posted 04 November 2015 - 09:58 PM
dan200, on 04 November 2015 - 05:25 PM, said:
Receiving headers was basically the only other thing we needed really, that's how cookies are set and I presume OAuth works through sending and receiving the headers. I can't really think of anything else on the front.
That said, at some point sockets, as Lignum mentioned, would be great in terms of allowing better multiplayer games, which I can see being something people wanting to make even more so than currently.
One thing on receiving headers, in previous version if the response failed (i.e. wasn't 200) it just failed. Is there some mechanism (probably through http.request and the events) to catch the response even if it's 404 or the like? Essentially, do the .get functions wrap and handle the error code in Lua or is it canceled in Java/whatever environment it's running in?
Edited by oeed, 04 November 2015 - 10:01 PM.
#407
Posted 05 November 2015 - 07:57 AM
Also, I've worked with OAuth before (outside of CC). I don't remember needing to use headers (But they are useful for OAuth). PostData what what I needed
#408
Posted 05 November 2015 - 11:07 AM
#409
Posted 05 November 2015 - 11:52 AM
dan200, on 05 November 2015 - 11:07 AM, said:
I may have missed something, but I'm surprised no one has mentioned binary HTTP handles. Maybe this isn't irrelevant in CraftOS 2, but the issue with binary strings and undesired automatic unicode conversion makes getting binary data with HTTP literally impossible. It's been mentioned multiple times in the suggestions forum. Either binary HTTP or a fix to the string bug would be amazing.
#410
Posted 05 November 2015 - 12:00 PM
ElvishJerricco, on 05 November 2015 - 11:52 AM, said:
dan200, on 05 November 2015 - 11:07 AM, said:
I may have missed something, but I'm surprised no one has mentioned binary HTTP handles. Maybe this isn't irrelevant in CraftOS 2, but the issue with binary strings and undesired automatic unicode conversion makes getting binary data with HTTP literally impossible. It's been mentioned multiple times in the suggestions forum. Either binary HTTP or a fix to the string bug would be amazing.
#411
Posted 05 November 2015 - 02:18 PM
Edited by MKlegoman357, 05 November 2015 - 02:18 PM.
#412
Posted 05 November 2015 - 02:19 PM
#413
Posted 05 November 2015 - 03:32 PM
Creator, on 05 November 2015 - 02:19 PM, said:
Since C is generally faster than Java and since that's the original Lua implementation, which has been in development for over 20 years, yes, that's probably the case. However, that also depends on what the new project is written in... native calls from within Java aren't exactly fast, mostly because the arguments need to be converted from Java to C. However, if done properly (take LWJGL as an example), you'll end up with little to no overhead.
#414
Posted 05 November 2015 - 04:07 PM
#415
Posted 05 November 2015 - 04:08 PM
#416
Posted 05 November 2015 - 06:51 PM
dan200, on 05 November 2015 - 11:07 AM, said:
I thought it did... It was too fiddly to search up the wiki on my phone though (my lame excuse for, I couldn't be bothered to check)...
#417
Posted 06 November 2015 - 12:45 PM
dan200, on 04 November 2015 - 05:25 PM, said:
Raw TCP would be cool too
Edited by ardera, 06 November 2015 - 12:49 PM.
#418
Posted 06 November 2015 - 12:56 PM
Or is it called protocols?
#421
Posted 06 November 2015 - 06:46 PM
ElvishJerricco, on 06 November 2015 - 05:33 PM, said:
It also can reach the speed of C (that is the language rather than "c" - the speed of light) for some tasks (though most of them are heavily maths based). The interpreter is hand-written in assembly to achieve maximum speed. It is an incredible project. Drools.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











