celluloid / celluloid-io

UNMAINTAINED: See celluloid/celluloid#779 - Evented sockets for Celluloid actors
https://celluloid.io
MIT License
879 stars 93 forks source link

evented telnet client library #41

Closed pberndt closed 11 years ago

pberndt commented 11 years ago

Hello Tony,

please find attached a celluloid port of the ruby-1.9.3-p374 telnet.rb

Best regards, Philipp

tarcieri commented 11 years ago

I think this might make more sense as a separate gem than part of Celluloid::IO proper

pberndt commented 11 years ago

Maybe. As an alternative, do you think it would be possible to further duck extend the Celluloid::IO class (by adding open, binmode, sync=, syswrite, and even select) so that the original telnet.rb could be used by just injecting TCPSocket and IO?

tarcieri commented 11 years ago

Yeah, I'd definitely be down to get those bits upstream

halorgium commented 11 years ago

I note that sync= and syswrite are now present.

@pberndt Could you open an issue with the remaining missing methods? I wasn't sure if the open class method was needed or not.

tarcieri commented 11 years ago

The open class method should be present too

halorgium commented 11 years ago

:metal:

HoneyryderChuck commented 10 years ago

@halorgium, is this telnet rewrite using celluloid io already available somewhere?

HoneyryderChuck commented 10 years ago

@halorgium, is this telnet rewrite using celluloid io already available somewhere?

tarcieri commented 10 years ago

@TiagoCardoso1983 not that I know of, but it might be possible to reuse Net::Telnet now

HoneyryderChuck commented 10 years ago

@tarcieri, what do you mean? I tried using a Celluloid IO TCPSocket as proxy for the Net::Telnet channel, and failed because it requested a subclass of IO or something like it. I tried it with ruby 1.9.3 . Are there any updates I don't know of?

tarcieri commented 10 years ago

@TiagoCardoso1983 if Net::Telnet is specifically asserting that a given object is an IO object, you'll have to change the code or use an alternative library that supports dependency injection