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

NetBeans IDE and Telnet Communication

Started by remiX, 22 January 2013 - 06:08 AM
remiX #1
Posted 22 January 2013 - 07:08 AM
Hey guys, a friend of mine are 'attemping' to make a chat/messenging type-program using Telnet communcation and using NetBeans to create the GUI of the program.

He's making the simple GUI of the program where he has left me to do the communication part which I'm clueless about because I'm trying to teach myself off their websites and other sources.

I was just wondering if anyone by any chance has used Telnet before and could maybe lead me in the right direction with a sample code or something I could work with to help me :P/>
D3matt #2
Posted 22 January 2013 - 09:20 AM
Telnet is incredibly simple. You open the stream, and you just send whatever stream of characters you want. Don't forget to use newlines at the end of each message is pretty much the only suggestion I can give.
dissy #3
Posted 22 January 2013 - 03:29 PM
Hey guys, a friend of mine are 'attemping' to make a chat/messenging type-program using Telnet communcation and using NetBeans to create the GUI of the program.

He's making the simple GUI of the program where he has left me to do the communication part which I'm clueless about because I'm trying to teach myself off their websites and other sources.

I was just wondering if anyone by any chance has used Telnet before and could maybe lead me in the right direction with a sample code or something I could work with to help me :P/>

You should check out the IRC protocol (RFC 1459) - It's line based and plain text and so works over sockets (and thus telnet)

For example, you can telnet to an irc server and send the proper HELO, NICK, and USER commands. You then show online.
To talk to a person the client sends PRIVMSG nick :msg goes here
PRIVMSG #channel :this is ironically how one talks in a channel too

Plus IRC has been around since 1987 (compared to the web, which was 1993) so is very tried and true
remiX #4
Posted 22 January 2013 - 11:12 PM
You guys make it soundso easy :P/> yeah I know how irc works but I need to know how to use telnet within the gui code in netbeans for communication can work.

Could you guys provide me with some links and/or even an example?
dissy #5
Posted 23 January 2013 - 12:58 PM
You guys make it soundso easy :P/> yeah I know how irc works but I need to know how to use telnet within the gui code in netbeans for communication can work.

Could you guys provide me with some links and/or even an example?

Ahh, I misunderstood backwards then. Sorry about that!

I have over 20 years of way-more-than-I-really-want in depth experience with the IRC protocol, however I've never used netbeans ever.

A good starting point would be to Google for "netbeans socket programming".
"Socket" is the more correct term for what you want in order to do "telnet" and telnet-like things.

Technically speaking, "telnet" is terminal cursor control over a plain socket, however most people use the terms interchangeably, since all telnet clients can function perfectly well as socket clients without getting or needing any cursor control commands.
Cranium #6
Posted 23 January 2013 - 03:11 PM
I had to google all these terms…..and when I came back, I am very excited to see this in action. Please post some videos, once you have some working code. I really want to be able to chat on IRC while in Minecraft.
KaoS #7
Posted 24 January 2013 - 02:52 AM
I have next to no experience with telnet, I can just use it to remote control CMD and test RDP etc but I too would really love to understand it more, please post your progress for those of us who would also like to learn
remiX #8
Posted 26 January 2013 - 05:57 AM
You guys make it soundso easy :P/> yeah I know how irc works but I need to know how to use telnet within the gui code in netbeans for communication can work.

Could you guys provide me with some links and/or even an example?

Ahh, I misunderstood backwards then. Sorry about that!

I have over 20 years of way-more-than-I-really-want in depth experience with the IRC protocol, however I've never used netbeans ever.

A good starting point would be to Google for "netbeans socket programming".
"Socket" is the more correct term for what you want in order to do "telnet" and telnet-like things.

Technically speaking, "telnet" is terminal cursor control over a plain socket, however most people use the terms interchangeably, since all telnet clients can function perfectly well as socket clients without getting or needing any cursor control commands.

Ahh, okay, thanks. I'll get to googling then…

I had to google all these terms…..and when I came back, I am very excited to see this in action. Please post some videos, once you have some working code. I really want to be able to chat on IRC while in Minecraft.

I wasn't going to use it to connect minecraft to an IRC server, though…

I have next to no experience with telnet, I can just use it to remote control CMD and test RDP etc but I too would really love to understand it more, please post your progress for those of us who would also like to learn

Sure I will, but it will be a while from now
Cranium #9
Posted 26 January 2013 - 06:02 AM
I wasn't going to use it to connect minecraft to an IRC server, though…
But this would allow for that won't it?
remiX #10
Posted 26 January 2013 - 06:09 AM
I wasn't going to use it to connect minecraft to an IRC server, though…
But this would allow for that won't it?

Hmm.. no clue to be honest…

ps: gratz on becoming a staff :P/>