Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Very simple telnet server written in C++

NotificationsYou must be signed in to change notification settings

styczynski/telnetish.cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple C++ implementation of telnet server.

Contents:

  • About
  • Building
  • Running
  • Implementation
    • Directory structure
    • About

About

This project was coded for networking course at Warsaw University (Faculty of Mathematics, Informatics and Mechanics).
It's purpose was to design and implement simple telnet server serving basic menu with selectable options.

Building

To build the source please enter the following sequence of commands to your terminal:

$ cd <main_folder_of_telnetish>$ mkdir build && cd build$ cmake ..$ make

The make command should generatetelnet_server binary.

Running

The server usage looks like follows:

./telnet_server server <port> [flags]

Where there exist the following flags:

SwitchDescription
--local
Alias:-l
Run the server in local mode. In that mode server is not really a server
but a local program that runs the implemented ncurses app in your terminal.
--nosplashDisable initial splash screen animation
--nocolors
Alias:-nc
Disable any ANSI color sequences
--verbose
Alias:-v
Verbosive output mode

Implementation

Directory structure

telnetish |- include  (telnetish header files) |- src      (telnetish implemnetations of header files functions) \- server   (server entrypoint and ncurses application)

About

The implementation is a bit unusual.
The telnet server itself is implemented inserver/server.cpp usinginclude/telnet-server.h andinclude/stimple-telnet-server.h.

The basic idea is that the clients connects to the server synchronically (each client is served after the current one quits application,disconnects or is timed out).

The server (seeinclude/term-program.h) forks itself and asynchronically runs ncurses applciation (seesrc/renderer.h).
The input and output is transferred from client to the forked process via pipes (and vice-versa).

It enables us to support any terminal type that is supported by ncurses and easilly implement console application via ncurses popular library.
Additionally the server can be started with--local switch to run as normal ncurses application without any network communication (useful whenyou want to locally test your application).

About

Very simple telnet server written in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp