telnet
Version, currently 1.0.13 versions
- 1.0.1latestFeb 26, 2025
- 1.0.0not indexedFeb 26, 2025
- 0.5.0not indexedFeb 26, 2025
github.com/mjblack/telnet
A Crystal Shard for creating telnet servers and clients
3 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
telnet:
github: mjblack/telnet
version: ~> 1.0.1Then run:
shards installshard.yml
- Crystal
>= 1.15.0- License
- MIT
- Author
- Matthew J. Black
Dependencies
Development Dependencies
- ameba*github: crystal-ameba/amebadev
README
telnet
Telnet shard that provides server and client classes. It provides a parser class that handles telnet events with callbacks.
Installation
-
Add the dependency to your
shard.yml:dependencies: telnet: github: mjblack/telnet -
Run
shards install
Usage
Please see examples/simple_server.cr for a more detailed example that showcases telnet command and subnegotiation handling.
require "telnet"
server = Telnet::Server.new("0.0.0.0", 23)
server.on_connect do |session|
puts "New client connected: #{session.remote_address}"
dont_echo = Telnet::Command.new_dont(Telnet::Option::ECHO)
io.write(dont_echo)
puts "Sent dont echo"
end
server.on_disconnect do |session|
puts "Client disconnected: #{session.remote_address}"
end
server.on_wont_echo do |session|
puts "Client: WONT ECHO"
end
# Spawns listener
server.listen
while true
Fiber.yield
end
Contributing
- Fork it (https://github.com/mjblack/telnet/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Matthew J. Black - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.1- Tagged
- Feb 26, 2025
- Commit
19957bbf21b8- Crystal
>= 1.15.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/mjblack/telnet
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 3